Bugzilla – Attachment 170313 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.68 KB, created by
Paul Derscheid
on 2024-08-14 10:08:44 UTC
(
hide
)
Description:
Bug 37644: Let developers configure flatpickr defaultHour and defaultMinute via its config object
Filename:
MIME Type:
Creator:
Paul Derscheid
Created:
2024-08-14 10:08:44 UTC
Size:
1.68 KB
patch
obsolete
>From fcd80e40d39c3d40e9ac398d81190a6440e748cc 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 >--- > 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.46.0
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