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
parent c179408a0d
commit 04e8733721

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