Bug 37542: Fix patron search when dateofbirth is a DefaultPatronSearchField
This patch updates the call to dayjs to use strict parsing for patron search. See https://day.js.org/docs/en/parse/string-format
To test:
1. Create a patron with dateofbirth 1994-07-27
2. Add dateofbirth to DefaultPatronSearchFields
3. In patron or checkout search, type a cardnumber like '2908800092528'
4. Note the patron with that birth date is found in autocomplete
5. Apply patch and restart_all
6. Repeat step 3 and notice the patron is no longer found
7. In patron or checkout search, try searches using a formatted date
8. Confirm searches for '07/27/1994' and '1994-07-27' find the patron
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 764162cd6d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
674adef99d
commit
a1cd2f859e
|
|
@ -91,7 +91,7 @@
|
|||
|
||||
window.$date_to_rfc3339 = function(value, options) {
|
||||
var dateformat = (options&&options.dateformat)||def_date_format;
|
||||
let m = dayjs(value, get_date_pattern(dateformat));
|
||||
let m = dayjs(value, get_date_pattern(dateformat), true);
|
||||
return m.format("YYYY-MM-DD");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue