Skip to content

Commit 644f555

Browse files
authored
Merge pull request #6726 from nextcloud-libraries/fix/date-time-picker
fix(NcDateTimePicker): prevent emitting `[Date, null]`
2 parents 1b55eb6 + b581e58 commit 644f555

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/components/NcDateTimePicker/NcDateTimePicker.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,12 @@ const pickerType = computed(() => ({
375375
yearPicker: props.type === 'year',
376376
monthPicker: props.type === 'month',
377377
weekPicker: props.type === 'week',
378-
range: props.type.startsWith('range'),
378+
range: props.type.startsWith('range') && {
379+
// do not use partial ranges (meaning after selecting the start [Date, null] will be emitted)
380+
// if this is needed someday we can enable it,
381+
// but its not covered by our component interface (props / events) documentation so just disabled for now.
382+
partialRange: false,
383+
},
379384
enableTimePicker: !(props.type === 'date' || props.type === 'range'),
380385
flow: props.type === 'datetime'
381386
? ['calendar', 'time'] as ['calendar', 'time']

0 commit comments

Comments
 (0)