CMS add/edit-article (chiangmai, where-else): remove flatpickr onReady todayDateElem highlight; element is null/undefined at onReady and the class has no CSS, and the throw could prevent the Save handler from binding on add pages
This commit is contained in:
1 parent
d49c3e2d97
commit
e94d72130d
4 files changed
-20
No files matched your search
-5
@@ -524,11 +524,6 @@
|
||||
enableTime: false,
|
||||
dateFormat: 'd-m-Y',
|
||||
defaultDate: null, // Do not preselect any date
|
||||
onReady: function(selectedDates, dateStr, instance) {
|
||||
// Highlight today's date with a custom CSS class
|
||||
const today = instance.todayDateElem;
|
||||
today.classList.add('flatpickr-today-highlight'); // Add a custom class to today
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '#btn_submit', function(e) {
|
||||
|
||||
-5
@@ -297,11 +297,6 @@
|
||||
enableTime: false,
|
||||
dateFormat: 'd-m-Y',
|
||||
defaultDate: null, // Do not preselect any date
|
||||
onReady: function(selectedDates, dateStr, instance) {
|
||||
// Highlight today's date with a custom CSS class
|
||||
const today = instance.todayDateElem;
|
||||
today.classList.add('flatpickr-today-highlight'); // Add a custom class to today
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -537,11 +537,6 @@
|
||||
enableTime: false,
|
||||
dateFormat: 'd-m-Y',
|
||||
defaultDate: null, // Do not preselect any date
|
||||
onReady: function(selectedDates, dateStr, instance) {
|
||||
// Highlight today's date with a custom CSS class
|
||||
const today = instance.todayDateElem;
|
||||
today.classList.add('flatpickr-today-highlight'); // Add a custom class to today
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '#btn_submit', function(e) {
|
||||
|
||||
@@ -308,11 +308,6 @@
|
||||
enableTime: false,
|
||||
dateFormat: 'd-m-Y',
|
||||
defaultDate: null, // Do not preselect any date
|
||||
onReady: function(selectedDates, dateStr, instance) {
|
||||
// Highlight today's date with a custom CSS class
|
||||
const today = instance.todayDateElem;
|
||||
today.classList.add('flatpickr-today-highlight'); // Add a custom class to today
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user