Skip to content

Commit

Permalink
docs(datetime-picker): fix build issues (#2104)
Browse files Browse the repository at this point in the history
  • Loading branch information
portikM authored Mar 28, 2024
1 parent b0a0a30 commit 6490e05
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docs/components/datetime-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ import { ref, reactive } from 'vue'
import { TimePeriods, TimeframeKeys } from '@mocks/KDateTimePickerMockData'
import type { TimeFrameSection } from '@/types'

const exampleTimeFrames: TimeFrameSection[] = reactive([
const exampleTimeFrames: TimeFrameSection[] = [
{
section: 'Last',
values: [
Expand All @@ -472,36 +472,36 @@ const exampleTimeFrames: TimeFrameSection[] = reactive([
TimePeriods.get(TimeframeKeys.PREVIOUS_MONTH),
],
},
])
]

const today = new Date()
const tomorrow = new Date().getTime() + 1 * 24 * 60 * 60 * 1000
const twoDaysAgo = new Date(today.getTime() - 2 * 24 * 60 * 60 * 1000)
const aWeekAgo = new Date(today.getTime() - 7 * 24 * 60 * 60 * 1000)
const aYearAgo = new Date(today.getTime() - 365 * 24 * 60 * 60 * 1000)

const singleDateEmpty = ref({
const singleDateEmpty = ref<TimeRange>({
start: null,
end: null,
})

const singleDateToday = reactive({
const singleDateToday = ref<TimeRange>({
start: today,
end: null,
})

const dateRangeWeek = reactive({
const dateRangeWeek = ref<TimeRange>({
start: aWeekAgo,
end: today,
})

const dateRangeWeekRelative = reactive({
const dateRangeWeekRelative = ref<TimeRange>({
start: aWeekAgo,
end: today,
timePeriodsKey: TimeframeKeys.SEVEN_DAY,
})

const oneHourRelativeOnly = reactive({
const oneHourRelativeOnly = ref<TimeRange>({
start: null,
end: null,
timePeriodsKey: TimeframeKeys.ONE_HOUR,
Expand Down

0 comments on commit 6490e05

Please sign in to comment.