diff --git a/docs/components/datetime-picker.md b/docs/components/datetime-picker.md index eb4197fcf7..3d0d903b04 100644 --- a/docs/components/datetime-picker.md +++ b/docs/components/datetime-picker.md @@ -182,7 +182,7 @@ This utilizes the same time frames as the previous example; however, in this exa
-
Emitted value:
{{ currentValue6 }}
+
Emitted value:
{{ currentValueTimeframe }}
```html @@ -437,7 +437,7 @@ export default { start: aWeekAgo, end: today }, - currentValue6: { + currentValueTimeframe: { start: aWeekAgo, end: today, timePeriodsKey: TimeframeKeys.SEVEN_DAY diff --git a/src/components/KDateTimePicker/KDateTimePicker.cy.ts b/src/components/KDateTimePicker/KDateTimePicker.cy.ts index 853d3a8a36..6c5a637a95 100644 --- a/src/components/KDateTimePicker/KDateTimePicker.cy.ts +++ b/src/components/KDateTimePicker/KDateTimePicker.cy.ts @@ -42,6 +42,7 @@ const maxDate = today const defaultTimeRange = { start: twoDaysAgo, end: today, + timePeriodsKey: TimeframeKeys.ONE_DAY, } const emptyTimeRange = { start: null, diff --git a/src/components/KDateTimePicker/KDateTimePicker.vue b/src/components/KDateTimePicker/KDateTimePicker.vue index 65f141e0c4..e1200bbbbf 100644 --- a/src/components/KDateTimePicker/KDateTimePicker.vue +++ b/src/components/KDateTimePicker/KDateTimePicker.vue @@ -307,7 +307,7 @@ const state = reactive({ previouslySelectedRange: { start: new Date(), end: new Date(), timePeriodsKey: '' }, selectedTimeframe: props.timePeriods[0]?.values[0], previouslySelectedTimeframe: props.timePeriods[0]?.values[0], - tabName: 'custom', + tabName: 'relative', }) /** diff --git a/src/types/date-time-picker.ts b/src/types/date-time-picker.ts index ca2e0171be..a7c545af56 100644 --- a/src/types/date-time-picker.ts +++ b/src/types/date-time-picker.ts @@ -36,7 +36,6 @@ export interface CSSProperties { } export enum TimepickerMode { - // MA-2348: Re-enable, or move to a new component D = 'date', T = 'time', DT = 'dateTime', @@ -48,7 +47,6 @@ export enum TimepickerMode { export const ModeArray: string[] = Object.values(TimepickerMode) export const ModeArrayCustom: string[] = [ - // MA-2348: Re-enable, or move to a new component TimepickerMode.D, TimepickerMode.T, TimepickerMode.DT,