Skip to content

Commit

Permalink
fix: address comments [MA-2131]
Browse files Browse the repository at this point in the history
  • Loading branch information
mihai-peteu committed Dec 6, 2023
1 parent cffbed6 commit caf6150
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions docs/guide/migrating-to-version-9.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions src/components/KDateTimePicker/KDateTimePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -157,7 +157,7 @@ const props = defineProps({
default: true,
},
modelValue: {
type: [Object] as PropType<TimeRange>,
type: Object as PropType<TimeRange>,
required: false,
default: () => ({ start: null, end: null }),
validator: (value: TimeRange): boolean => {
Expand Down
6 changes: 3 additions & 3 deletions src/types/date-time-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -59,7 +59,7 @@ export enum TimepickerMode {
Datetime = 'dateTime',
Relative = 'relative',
RelativeDate = 'relativeDate',
RelativeDateTime = 'relativeDateTime'
RelativeDateTime = 'relativeDateTime',
}

export const ModeArray: string[] = Object.values(TimepickerMode)
Expand Down

0 comments on commit caf6150

Please sign in to comment.