diff options
Diffstat (limited to 'apps/files_sharing/src/components/SharingEntryLink.vue')
-rw-r--r-- | apps/files_sharing/src/components/SharingEntryLink.vue | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/files_sharing/src/components/SharingEntryLink.vue b/apps/files_sharing/src/components/SharingEntryLink.vue index 2c19afd1dca..781626a1ec9 100644 --- a/apps/files_sharing/src/components/SharingEntryLink.vue +++ b/apps/files_sharing/src/components/SharingEntryLink.vue @@ -108,7 +108,8 @@ type="date" :min="dateTomorrow" :max="maxExpirationDateEnforced" - @change="expirationDateChanged($event)"> + @update:model-value="onExpirationChange" + @change="expirationDateChanged"> <template #icon> <IconCalendarBlank :size="20" /> </template> @@ -874,9 +875,9 @@ export default { }, expirationDateChanged(event) { - const date = event.target.value - this.onExpirationChange(date) - this.defaultExpirationDateEnabled = !!date + const value = event?.target?.value + const isValid = !!value && !isNaN(new Date(value).getTime()) + this.defaultExpirationDateEnabled = isValid }, /** |