Bug 31149

Summary: Use dayjs to parse dates
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: BLOCKED --- QA Contact: Martin Renvoize <martin.renvoize>
Severity: enhancement    
Priority: P5 - low CC: martin.renvoize, oleonard, tomascohen
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30673
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 30310    
Bug Blocks:    
Attachments: Bug 31149: Use dayjs to parse dates
Bug 31149: Use dayjs to parse dates
Bug 31149: Use dayjs to parse dates

Description Jonathan Druart 2022-07-13 07:04:42 UTC
We don't need our own JS functions to parse date, we can rely on dayjs for that.
Comment 1 Jonathan Druart 2022-07-13 07:08:18 UTC
Created attachment 137680 [details] [review]
Bug 31149: Use dayjs to parse dates

We can use the isValid's dayjs function instead of our own parsing
functions.

Test plan:
Confirm that you cannot enter an invalid date when using a date picker widget.
Comment 2 Paul Derscheid 2022-12-16 14:13:20 UTC
Created attachment 144680 [details] [review]
Bug 31149: Use dayjs to parse dates

We can use the isValid's dayjs function instead of our own parsing
functions.

Test plan:
Confirm that you cannot enter an invalid date when using a date picker widget.

Works as expected.

Signed-off-by: LMSCloudPaulD <paul.derscheid@lmscloud.de>
Comment 3 Martin Renvoize 2022-12-20 12:56:06 UTC
Created attachment 144733 [details] [review]
Bug 31149: Use dayjs to parse dates

We can use the isValid's dayjs function instead of our own parsing
functions.

Test plan:
Confirm that you cannot enter an invalid date when using a date picker widget.

Works as expected.

Signed-off-by: LMSCloudPaulD <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Martin Renvoize 2022-12-20 12:56:49 UTC
This would be a PQA from me.. but we're blocked so marking as such.