From 94d4d88fd165206b693b4a36ef1590d08a91c86d Mon Sep 17 00:00:00 2001 From: mihai-peteu Date: Thu, 30 Nov 2023 12:54:57 -0800 Subject: [PATCH] feat: cleanup [MA-2131] --- docs/components/datetime-picker.md | 6 +++--- src/components/KDateTimePicker/KDateTimePicker.cy.ts | 1 + src/components/KDateTimePicker/KDateTimePicker.vue | 2 +- src/types/date-time-picker.ts | 2 -- 4 files changed, 5 insertions(+), 6 deletions(-) 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,