Skip to content

PickerDateSelected

A component that supports switching between the calendar and choosing time.

Props

template
Display template
type:String
default:date
values:date, time
format
Date displayed format
type:String
default:YYYY-MM-DD
date:
required
Date in Dayjs format
type:Dayjs
default:{} as dayjs.Dayjs

Example

Time template
00:02
html
<picker-date-selected template="time" format="HH:mm" :date="state.startDate" />
ts
import dayjs from 'dayjs'
const state = {
  startDate: dayjs('2023-05-25T02:02:00+02:00')
}
Date template
2023-05-25
html
<picker-date-selected template="date" />
ts
import dayjs from 'dayjs'
const state = {
  startDate: dayjs('2023-05-25T02:02:00+02:00')
}