Allow user to finish typing date before formatting

Debounce `onExpirationChange` to avoid calling `formatDateToString`
on invalid on uncompletely inputed date strings.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
This commit is contained in:
fenn-cs 2023-12-08 18:02:14 +01:00 committed by John Molakvoæ
parent 67e3367c48
commit b5edb389bc
No known key found for this signature in database
GPG key ID: 60C25B8C072916CF

View file

@ -221,10 +221,9 @@ export default {
*
* @param {Date} date
*/
onExpirationChange(date) {
onExpirationChange: debounce((date) => {
this.share.expireDate = this.formatDateToString(new Date(date))
},
}, 500),
/**
* Uncheck expire date
* We need this method because @update:checked