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();
2
Answers
What i figure out is that with the solution of @IT goldman and windows.onload it works like a charm! Much thanks again!
};
Lookin the source code and/or using the DevTools inspector, you can tell that the culprit is the class
.today
. So let’s remove it on the event of open.