You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on my plugin, the theme initialize flatpickr with data attribute like below:
data-fp-options="{"enableTime":true, "minTime":"10:00","maxTime":"17:00","altInput":true,"altFormat":"F j, Y H:i","dateFormat":"F j, Y H:i","time_24hr":false,"allowInput":true,"locale":{"firstDayOfWeek":1},"defaultHour":"10"}"
Use theme provided hook to add "minDate":"today" to the attribute, everything is working fine, but not "minDate":"April 15, 2024 10:00".
Try to use instance method like below:
const fp = datePickerField.querySelector('input.flatpickr')._flatpickr;
fp.set('minDate', new Date("April 15, 2024 10:00"));
flatpickr calendar working on first time modal open.
if no date selected and modal close, on next following modal open like below
But once click next arrow, everything is back to normal. am i missing something ?
The text was updated successfully, but these errors were encountered:
https://jsfiddle.net/tj2Lo4z7/
Your Environment
While working on my plugin, the theme initialize flatpickr with data attribute like below:
data-fp-options="{"enableTime":true, "minTime":"10:00","maxTime":"17:00","altInput":true,"altFormat":"F j, Y H:i","dateFormat":"F j, Y H:i","time_24hr":false,"allowInput":true,"locale":{"firstDayOfWeek":1},"defaultHour":"10"}"
Use theme provided hook to add "minDate":"today" to the attribute, everything is working fine, but not "minDate":"April 15, 2024 10:00".
Try to use instance method like below:
const fp = datePickerField.querySelector('input.flatpickr')._flatpickr;
fp.set('minDate', new Date("April 15, 2024 10:00"));
flatpickr calendar working on first time modal open.
if no date selected and modal close, on next following modal open like below
But once click next arrow, everything is back to normal. am i missing something ?
The text was updated successfully, but these errors were encountered: