Load flatpickr using selectors (classes)

This commit is contained in:
Saria Hajjar 2019-12-28 21:33:07 +00:00
parent f9a92c5afb
commit c7ac52a6de

View File

@ -251,6 +251,24 @@ $(document).ready(function() {
}
});
// Flatpickr selectors
$('.date-picker').flatpickr({
allowInput: true
});
$('.datetime-picker').flatpickr({
allowInput: true,
enableSeconds: true,
enableTime: true,
time_24hr: true
});
$('.time-picker').flatpickr({
allowInput: true,
enableSeconds: true,
enableTime: true,
noCalendar: true,
time_24hr: true
});
// API backed tags
var tags = $('#id_tags');
if (tags.length > 0 && tags.val().length > 0){