Skip to content

Commit

Permalink
feat: cleanup [MA-2131]
Browse files Browse the repository at this point in the history
  • Loading branch information
mihai-peteu committed Nov 30, 2023
1 parent 9d59f31 commit 94d4d88
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/components/datetime-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ This utilizes the same time frames as the previous example; however, in this exa

<ClientOnly>
<KDateTimePicker
v-model="currentValue6"
v-model="currentValueTimeframe"
placeholder="Please select a time frame"
mode="relativeDate"
width="480"
Expand All @@ -192,7 +192,7 @@ This utilizes the same time frames as the previous example; however, in this exa
:time-periods="exampleTimeFrames"
/>
<br/>
<div>Emitted value: <pre class="json hide-from-percy">{{ currentValue6 }}</pre></div>
<div>Emitted value: <pre class="json hide-from-percy">{{ currentValueTimeframe }}</pre></div>
</ClientOnly>

```html
Expand Down Expand Up @@ -437,7 +437,7 @@ export default {
start: aWeekAgo,
end: today
},
currentValue6: {
currentValueTimeframe: {
start: aWeekAgo,
end: today,
timePeriodsKey: TimeframeKeys.SEVEN_DAY
Expand Down
1 change: 1 addition & 0 deletions src/components/KDateTimePicker/KDateTimePicker.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const maxDate = today
const defaultTimeRange = {
start: twoDaysAgo,
end: today,
timePeriodsKey: TimeframeKeys.ONE_DAY,
}
const emptyTimeRange = {
start: null,
Expand Down
2 changes: 1 addition & 1 deletion src/components/KDateTimePicker/KDateTimePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ const state = reactive<DateTimePickerState>({
previouslySelectedRange: { start: new Date(), end: new Date(), timePeriodsKey: '' },
selectedTimeframe: props.timePeriods[0]?.values[0],
previouslySelectedTimeframe: props.timePeriods[0]?.values[0],
tabName: 'custom',
tabName: 'relative',
})

/**
Expand Down
2 changes: 0 additions & 2 deletions src/types/date-time-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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,
Expand Down

0 comments on commit 94d4d88

Please sign in to comment.