From 686e4aa1e557ce8fd5bc8e0f0bccb13bc1fc5715 Mon Sep 17 00:00:00 2001 From: Jason Savell Date: Thu, 29 Feb 2024 13:50:55 -0600 Subject: [PATCH] Interim fix for calendar bug pending upstream merge Upstream PR: https://github.com/coral-erm/coral/pull/748 --- js/plugins/jquery.datePicker-patched-for-i18n.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/js/plugins/jquery.datePicker-patched-for-i18n.js b/js/plugins/jquery.datePicker-patched-for-i18n.js index a38933553..b29e6ef55 100644 --- a/js/plugins/jquery.datePicker-patched-for-i18n.js +++ b/js/plugins/jquery.datePicker-patched-for-i18n.js @@ -141,7 +141,13 @@ s.renderCallback(d, currentDate, month, year); } r.append(d); - currentDate.addDays(1); + /* Fix found in http://2008.kelvinluck.com/assets/jquery/datePicker/v2/demo/scripts/jquery.datePicker.js + * and file copied to ./plugins/jquery.datePicker.original.js + */ + // addDays(1) fails in some locales due to daylight savings. See issue 39. + //currentDate.addDays(1); + // set the time to midday to avoid any weird timezone issues?? + currentDate = new Date(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDate()+1, 12, 0, 0); } tbody.append(r); }