OiO.lk Blog javascript How to remove the default date in flatpickr
javascript

How to remove the default date in flatpickr


The issue i am facing is the i don’t seem to find any information about deselect the default date(current day).


flatpickr("#datepicker", {
    defaultDate: '',
    dateFormat: "d-m-Y H:i",
    enableTime: true,
    open: true,
    inline: true,
    minDate: "today",
});

I try to use the "defaultDate" as many examples in the web but nothing seems to work. I have not find any information in the documentation except "defaultDate".

I try as well to use onChange , onReady and onOpen nothing seems to work.

 onChange: function(selectedDates, dateStr, instance) {
                    instance.clear(); 



You need to sign in to view this answers

Exit mobile version