From 43e0ad3fe148cd3d8538ba629d177e45aab9f500 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 18 May 2021 09:10:26 +0200 Subject: [PATCH] Bug 28351: (bug 26261) Fix datepicker for dateformat ne mm/dd/yyyy MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch restores the same code we have prior to bug 26261 0. Set dateformat to mm/dd/yyyy 1. Go to a patron detail page 2. Open the 'Restrictions' tab 3. Choose a future date in which the day is higher than 12 => SUCCESS: The input has the date we chose 4. Set dateformat to dd/mm/yyyy 5. Repeat 3 => FAIL: It sets the current date, the browser console shows an error. Signed-off-by: Lucas Gass Signed-off-by: Tomás Cohen Arazi Signed-off-by: Jonathan Druart (cherry picked from commit 539396fb27e02118d34f3b914fd2baffee752aa7) Signed-off-by: Fridolin Somers --- koha-tmpl/intranet-tmpl/prog/js/calendar.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/calendar.js b/koha-tmpl/intranet-tmpl/prog/js/calendar.js index 2b335ec9bc..1f312e813d 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/calendar.js +++ b/koha-tmpl/intranet-tmpl/prog/js/calendar.js @@ -192,8 +192,6 @@ $(document).ready(function () { }).on("change", function () { if (!is_valid_date($(this).val())) { $(this).val(""); - } else { - $(this).datepicker("setDate",$(this).val()); } }); // http://jqueryui.com/demos/datepicker/#date-range -- 2.39.5