From e94d72130d53484d2924dadda7491d98b8b7b30c Mon Sep 17 00:00:00 2001 From: kurogeek Date: Tue, 27 Oct 2026 02:07:59 +0000 Subject: [PATCH] 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 --- .../resources/views/backend/article-where-else/add.blade.php | 5 ----- .../views/backend/article-where-else/edit.blade.php | 5 ----- .../resources/views/backend/article/add.blade.php | 5 ----- .../resources/views/backend/article/edit.blade.php | 5 ----- 4 files changed, 20 deletions(-) diff --git a/think-backend.greaterchiangmai.com/resources/views/backend/article-where-else/add.blade.php b/think-backend.greaterchiangmai.com/resources/views/backend/article-where-else/add.blade.php index 6c1589b..a099346 100644 --- a/think-backend.greaterchiangmai.com/resources/views/backend/article-where-else/add.blade.php +++ b/think-backend.greaterchiangmai.com/resources/views/backend/article-where-else/add.blade.php @@ -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) { diff --git a/think-backend.greaterchiangmai.com/resources/views/backend/article-where-else/edit.blade.php b/think-backend.greaterchiangmai.com/resources/views/backend/article-where-else/edit.blade.php index 58eaef1..fba0d70 100644 --- a/think-backend.greaterchiangmai.com/resources/views/backend/article-where-else/edit.blade.php +++ b/think-backend.greaterchiangmai.com/resources/views/backend/article-where-else/edit.blade.php @@ -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 - } }); }); diff --git a/think-backend.greaterchiangmai.com/resources/views/backend/article/add.blade.php b/think-backend.greaterchiangmai.com/resources/views/backend/article/add.blade.php index a150302..ec7ea96 100644 --- a/think-backend.greaterchiangmai.com/resources/views/backend/article/add.blade.php +++ b/think-backend.greaterchiangmai.com/resources/views/backend/article/add.blade.php @@ -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) { diff --git a/think-backend.greaterchiangmai.com/resources/views/backend/article/edit.blade.php b/think-backend.greaterchiangmai.com/resources/views/backend/article/edit.blade.php index f1d25fb..a10a6f4 100644 --- a/think-backend.greaterchiangmai.com/resources/views/backend/article/edit.blade.php +++ b/think-backend.greaterchiangmai.com/resources/views/backend/article/edit.blade.php @@ -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 - } }); });