Skip to content

Commit 58d7357

Browse files
GVodyanovShGKme
andauthored
Update src/components/NcDateTimePicker/NcDateTimePicker.vue
Co-authored-by: Grigorii K. Shartsev <me@shgk.me> Signed-off-by: Grigory Vodyanov <scratchx@gmx.com>
1 parent 149cc32 commit 58d7357

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

src/components/NcDateTimePicker/NcDateTimePicker.vue

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -542,19 +542,8 @@ const pickerType = computed(() => ({
542542
}))
543543
544544
// Convert min/max Date into VueDatePicker's time object shape
545-
const minTime = computed(() => {
546-
if (!props.min) {
547-
return undefined
548-
}
549-
return { hours: props.min.getHours(), minutes: props.min.getMinutes(), seconds: props.min.getSeconds() }
550-
})
551-
552-
const maxTime = computed(() => {
553-
if (!props.max) {
554-
return undefined
555-
}
556-
return { hours: props.max.getHours(), minutes: props.max.getMinutes(), seconds: props.max.getSeconds() }
557-
})
545+
const minTime = computed(() => props.min && { hours: props.min.getHours(), minutes: props.min.getMinutes(), seconds: props.min.getSeconds() })
546+
const maxTime = computed(() => props.max && { hours: props.max.getHours(), minutes: props.max.getMinutes(), seconds: props.max.getSeconds() })
558547
559548
/**
560549
* Called on model value update of the library.

0 commit comments

Comments
 (0)