Bugzilla – Attachment 187979 Details for
Bug 31149
Use dayjs to parse dates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31149: Add dayjs plugins
Bug-31149-Add-dayjs-plugins.patch (text/plain), 1.79 KB, created by
Pedro Amorim
on 2025-10-16 09:30:42 UTC
(
hide
)
Description:
Bug 31149: Add dayjs plugins
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2025-10-16 09:30:42 UTC
Size:
1.79 KB
patch
obsolete
>From 1c2336f185a415e00090b347ddbcadd810152081 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@openfifth.co.uk> >Date: Thu, 16 Oct 2025 09:29:22 +0000 >Subject: [PATCH] Bug 31149: Add dayjs plugins > >It seems dayjs is now being imported twice? With the second time overriding the first, but without the plugins. >This patch "fixes" the issue by proving this, but there is likely a better solution than this copy-paste from js-date-format.inc >--- > koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc | 6 ++++++ > 1 file changed, 6 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >index cd498a00c6d..2ba706d304d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >@@ -38,12 +38,18 @@ > </script> > <!-- / calendar.inc --> > [% Asset.js("lib/dayjs/dayjs.min.js") | $raw %] >+ [% Asset.js("lib/dayjs/plugin/utc.js") | $raw %] >+ [% Asset.js("lib/dayjs/plugin/timezone.js") | $raw %] >+ [% Asset.js("lib/dayjs/plugin/customParseFormat.js") | $raw %] > [% Asset.js("js/calendar.js") | $raw %] > [% Asset.js("lib/flatpickr/flatpickr.min.js") | $raw %] > [% Asset.js("lib/flatpickr/shortcut-buttons-flatpickr.min.js") | $raw %] > [% Asset.js("lib/maskito/maskito.core.js") | $raw %] > [% Asset.js("lib/maskito/maskito.kit.js") | $raw %] > <script> >+ dayjs.extend(window.dayjs_plugin_utc); >+ dayjs.extend(window.dayjs_plugin_timezone); >+ dayjs.extend(window.dayjs_plugin_customParseFormat); > flatpickr.l10ns.default.weekdays = flatpickr_weekdays; > flatpickr.l10ns.default.months = flatpickr_months; > flatpickr.l10ns.default.rangeSeparator = flatpickr_rangeSeparator; >-- >2.39.5
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 31149
:
137680
|
144680
|
144733
|
187511
|
187734
| 187979