https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30514

--- Comment #6 from Jonathan Druart <[email protected]> ---
What Katrin describes is not related to this bug report. It's very weird and I
have no idea where it's coming from.

I think there is still something wrong with this patch however. The
is_valid_date does not work as we are expecting. We used to have an alert if
the date was wrong.

The following change will restore the historical behaviour:

diff --git a/koha-tmpl/intranet-tmpl/prog/js/calendar.js
b/koha-tmpl/intranet-tmpl/prog/js/calendar.js
index 81561cc42d2..8ea4fbadfe6 100644
--- a/koha-tmpl/intranet-tmpl/prog/js/calendar.js
+++ b/koha-tmpl/intranet-tmpl/prog/js/calendar.js
@@ -22,12 +22,7 @@ function is_valid_date(date) {
         if (date.search(/^\d{2}\.\d{2}\.\d{4}($|\s)/) == -1) return 0;
         dateformat = 'd.m.Y';
     }
-    try {
-        flatpickr.parseDate(date, dateformat);
-    } catch (e) {
-        return 0;
-    }
-    return 1;
+    return flatpickr.parseDate(date, dateformat) ? 1 : 0;
 }

 function get_dateformat_str(dateformat) {

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to