From 09ce9c6d09f99a3a765d35e814b85a178d8e1ff7 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=UTF-8 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 --- 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 2b335ec9bcb..1f312e813da 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.20.1