Bug 32030: (follow-up) Fix date handling - conflicts with bug 30718

Fix "Filter by expired" returns 400 when no date provided

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2022-11-03 18:00:08 +01:00 committed by Tomas Cohen Arazi
parent 135e229e4b
commit 8edf973e07
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -121,6 +121,8 @@ export default {
if (this.filters.by_expired) {
if (!this.filters.max_expiration_date)
this.filters.max_expiration_date = new Date()
.toISOString()
.substring(0, 10)
}
$("#" + this.table_id)
.DataTable()