Skip to content

Commit cd7a751

Browse files
[6.x] Clearing a required date field should set the date/time to now (#13794)
1 parent d263f01 commit cd7a751

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

resources/js/components/fieldtypes/DateFieldtype.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ export default {
119119
},
120120
121121
datePickerUpdated(value) {
122+
// Clearing the date on a required Date field should set the date/time to now.
123+
if (!value && !this.isRange && this.config.required) {
124+
return this.addDate();
125+
}
126+
122127
if (!value) {
123128
return this.update(null);
124129
}

0 commit comments

Comments
 (0)