October 21, 2024
Chicago 12, Melborne City, USA
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

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video