Bugzilla – Attachment 170316 Details for
Bug 37644
Let developers configure flatpickr defaultHour and defaultMinute via its config object
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37644: Let developers configure flatpickr defaultHour and defaultMinute via its config object
Bug-37644-Let-developers-configure-flatpickr-defau.patch (text/plain), 1.73 KB, created by
Owen Leonard
on 2024-08-14 11:49:12 UTC
(
hide
)
Description:
Bug 37644: Let developers configure flatpickr defaultHour and defaultMinute via its config object
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2024-08-14 11:49:12 UTC
Size:
1.73 KB
patch
obsolete
>From d91d6b2aca474e7c222ef1aa8d9fc2cfa90bfef3 Mon Sep 17 00:00:00 2001 >From: Paul Derscheid <paul.derscheid@lmscloud.de> >Date: Wed, 14 Aug 2024 10:04:20 +0000 >Subject: [PATCH] Bug 37644: Let developers configure flatpickr defaultHour and > defaultMinute via its config object > >To test: >1) Go to any flatpickr instance, for example in circulation.pl when > setting a due date >2) Note that the default time 23:59 is set >3) Apply patch >4) Refresh >5) Note no change >6) Sign off > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >index 8d60a21370..8fe095d48c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >@@ -117,7 +117,7 @@ > if ( accepts_time ) { > let parsedDate = flatpickr.parseDate(dateText, instance.config.dateFormat); > if ( !parsedDate.getHours() ) { >- instance.setDate(selectedDates[0].setHours(23, 59, 0, 0)); >+ instance.setDate(selectedDates[0].setHours(instance.config.defaultHour ?? 23, instance.config.defaultMinute ?? 59, 0, 0)); > } > } > } >@@ -151,7 +151,7 @@ > label: _("or"), > onClick: (index, fp) => { > let date; >- let hh = 23, mm = 59; >+ let hh = fp.config.defaultHour ?? 23, mm = fp.config.defaultMinute ?? 59; > switch (index) { > case 0: > date = new Date().fp_incr(-1); >-- >2.39.2
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 37644
:
170313
| 170316