diff --git a/docs/guide/migrating-to-version-9.md b/docs/guide/migrating-to-version-9.md index 1b54c248a6..f0f82ac628 100644 --- a/docs/guide/migrating-to-version-9.md +++ b/docs/guide/migrating-to-version-9.md @@ -141,9 +141,9 @@ Kongponents styles are no longer designed to be utilized standalone, separately #### Props -* `minuteIncrement` Deprecated in favor of the `rules` prop. [Refer to v-calendar documentation](https://vcalendar.io/datepicker/time-rules.html) +* `minuteIncrement` Deprecated; we now internally default the `rules` prop to a 5 minute increment. [Refer to v-calendar documentation](https://vcalendar.io/datepicker/time-rules.html) -* `v-model` Single date and time picker's seed value (string in ISO date format) has been deprecated in favor of a `TimeRange` object whose `start` value will be set to a Date ISO string; `end` value will be set to `null`. +* `v-model` Single date and time picker's seed value (string in ISO date format) has been changed to a `TimeRange` object whose `start` value will be set to a Date ISO string; `end` value will be set to `null`. See KDateTimePickers's [v-model](/components/datetime-picker#v-model) for more details diff --git a/src/components/KDateTimePicker/KDateTimePicker.vue b/src/components/KDateTimePicker/KDateTimePicker.vue index 7b1ca9ed71..4c3e5f818f 100644 --- a/src/components/KDateTimePicker/KDateTimePicker.vue +++ b/src/components/KDateTimePicker/KDateTimePicker.vue @@ -62,7 +62,7 @@ v-model="calendarVModel" :drag-attribute="calendarDragAttributes" is-expanded - :is-range="!isSingleDatepicker ? true : false" + :is-range="!isSingleDatepicker" :max-date="maxDate" :min-date="minDate" :mode="impliedMode" @@ -157,7 +157,7 @@ const props = defineProps({ default: true, }, modelValue: { - type: [Object] as PropType, + type: Object as PropType, required: false, default: () => ({ start: null, end: null }), validator: (value: TimeRange): boolean => { diff --git a/src/types/date-time-picker.ts b/src/types/date-time-picker.ts index 5ae9499be3..eb7a7fe818 100644 --- a/src/types/date-time-picker.ts +++ b/src/types/date-time-picker.ts @@ -19,8 +19,8 @@ export type DatePickerRangeObject = { export type DatePickerModel = DatePickerDate | DatePickerRangeObject export interface TimeRange { - start: Date | null, - end: Date | null, + start: Date | null + end: Date | null timePeriodsKey?: string } @@ -59,7 +59,7 @@ export enum TimepickerMode { Datetime = 'dateTime', Relative = 'relative', RelativeDate = 'relativeDate', - RelativeDateTime = 'relativeDateTime' + RelativeDateTime = 'relativeDateTime', } export const ModeArray: string[] = Object.values(TimepickerMode)