Bugzilla – Attachment 127923 Details for
Bug 29478
flatpickr misses quick shortcut to "Today" date
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29478: (follow-up) Today should select now for pastinclusive
Bug-29478-follow-up-Today-should-select-now-for-pa.patch (text/plain), 1.68 KB, created by
Martin Renvoize (ashimema)
on 2021-11-22 10:36:12 UTC
(
hide
)
Description:
Bug 29478: (follow-up) Today should select now for pastinclusive
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-11-22 10:36:12 UTC
Size:
1.68 KB
patch
obsolete
>From cda267f700480c35461e0ed5cc7aa7b43ef27084 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 19 Nov 2021 10:55:47 +0100 >Subject: [PATCH] Bug 29478: (follow-up) Today should select now for > pastinclusive > >This is getting ugly. We need to add 1 minute for the minDate or the >'Today' link may not work. > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc | 11 +++++++++-- > 1 file changed, 9 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 11c8ee4e50..2805870d10 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >@@ -159,8 +159,15 @@ > let fp = $(this).flatpickr(options); > if ( refresh_max_date ) { > /* Refresh the maxDate every 30 secondes to make sure the user will not >- be stuck with the minute passed */ >- setInterval(() => { fp.set("maxDate", new Date()) }, 30000); >+ be stuck with the minute passed. >+ Adding 1 minute to not introduce a gap. >+ Example: last update at 40s, a new minute passed at 00. >+ Between 00 and 10s the user won't be able click 'Today'. >+ */ >+ setInterval(() => { >+ let now = new Date(); >+ fp.set("maxDate", now.setMinutes(now.getMinutes() + 1)); >+ }, 30000); > } > }); > }); >-- >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 29478
:
127626
|
127676
|
127694
|
127721
|
127722
|
127730
|
127804
|
127850
|
127890
|
127891
|
127892
|
127893
|
127920
|
127921
|
127922
| 127923 |
127968