Bugzilla – Attachment 124414 Details for
Bug 28938
Correct Flatpickr's default 12hr time formatting
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28938: Correct Flatpickr's default 12hr time formatting
Bug-28938-Correct-Flatpickrs-default-12hr-time-for.patch (text/plain), 1.87 KB, created by
Owen Leonard
on 2021-09-01 18:20:22 UTC
(
hide
)
Description:
Bug 28938: Correct Flatpickr's default 12hr time formatting
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2021-09-01 18:20:22 UTC
Size:
1.87 KB
patch
obsolete
>From d2ef9700d6c459fad4a0b564b4142ec2d9345fd6 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 1 Sep 2021 18:08:49 +0000 >Subject: [PATCH] Bug 28938: Correct Flatpickr's default 12hr time formatting > >This patch corrects Flatpickr's default 12 time formatting so that it >uses the formatting token "G" ("Hours, 2 digits with leading zeros") >instead of "h" ("Hours, 2 digits without leading zeros"). > >This will prevent incorrect times from being saved when the submitted >time is before 12. > >- To test, apply the patch go to Administration -> System preferences. >- Set the TimeFormat system preference to "12 hour" >- Find an item which is checked out and renewable. >- Go to Circulation -> Renew and use the date picker to select a time < > 12, e.g. 9:00 AM >- Submit the barcode for renewal. >- Check the patron's account to see the due date of the renewed item: It > should match the date and time you selected. >--- > koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >index 9a6ed01497..9a5e450ac0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >@@ -11,7 +11,7 @@ > var sentmsg = 0; > var bidi = [% IF(bidi) %] true[% ELSE %] false[% END %]; > var calendarFirstDayOfWeek = '[% Koha.Preference('CalendarFirstDayOfWeek') | html %]'; >- var flatpickr_timeformat_string = [% IF Koha.Preference('TimeFormat') == '12hr' %]"h:i K"[% ELSE %]"H:i"[% END %]; >+ var flatpickr_timeformat_string = [% IF Koha.Preference('TimeFormat') == '12hr' %]"G:i K"[% ELSE %]"H:i"[% END %]; > var flatpickr_timeformat = [% IF Koha.Preference('TimeFormat') == '12hr' %]false[% ELSE %]true[% END %]; > </script> > <!-- / calendar.inc --> >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 28938
:
124414
|
124417