Date time picker
Examples
Basic
API
Properties
Name
Description and specifications
dateFormat
Since 1.1.0
Date format string.
See {@link "https://moment.github.io/luxon/#/formatting?id=table-of-tokens"} for all available tokens.
Attribute:
date-formatType:
stringDefault:
'yyyy/LL/dd'eventDelimiter
Since 1.1.0
Deprecated
Not used anymore see `done` event
Default behavior of the done event is to join the two events (date and time) into one combined string output.
This combination can be configured over the delimiter
Attribute:
event-delimiterType:
stringDefault:
' - 'from
Since 1.1.0
The selected starting date. If the picker is not in range mode this is the selected date.
Format has to match the `format` property.
Attribute:
fromType:
string | undefinedi18nDone
Since 2.1.0
Text of date select button
Attribute:
i18n-doneType:
stringDefault:
'Done'locale
Since 2.1.0
Format of time string
See {@link "https://moment.github.io/luxon/#/formatting?id=table-of-tokens"} for all available tokens.
Attribute:
localeType:
string | undefinedmaxDate
Since 1.1.0
The latest date that can be selected by the date picker.
If not set there will be no restriction.
Attribute:
max-dateType:
string | undefinedminDate
Since 1.1.0
The earliest date that can be selected by the date picker.
If not set there will be no restriction.
Attribute:
min-dateType:
string | undefinedrange
If true a date-range can be selected (from/to).
Attribute:
rangeType:
booleanDefault:
trueshowHour
Show hour input
Attribute:
show-hourType:
booleanDefault:
trueshowMinutes
Show minutes input
Attribute:
show-minutesType:
booleanDefault:
trueshowSeconds
Show seconds input
Attribute:
show-secondsType:
booleanDefault:
trueshowTimeReference
Since 1.1.0
Show time reference input
Time reference is default aligned with
Attribute:
show-time-referenceType:
booleanDefault:
falsetextSelectDate
Since 1.1.0
Deprecated
since 2.1.0. Use `i18nDone`
Text of date select button
Attribute:
text-select-dateType:
string | undefinedtime
Since 1.1.0
Select time with format string
Attribute:
timeType:
string | undefinedtimeFormat
Since 1.1.0
Time format string.
See {@link "https://moment.github.io/luxon/#/formatting?id=table-of-tokens"} for all available tokens.
Attribute:
time-formatType:
stringDefault:
'HH:mm:ss'timeReference
Set time reference
Attribute:
time-referenceType:
"AM" | "PM" | undefinedto
Since 1.1.0
The selected end date. If the the picker is not in range mode this property has no impact.
Format has to match the `format` property.
Attribute:
toType:
string | undefinedweekStartIndex
Since 2.1.0
The index of which day to start the week on, based on the Locale#weekdays array.
E.g. if the locale is en-us, weekStartIndex = 1 results in starting the week on monday.
Attribute:
week-start-indexType:
numberDefault:
0Events
Name
Description and specifications
dateChange
Since 1.1.0
Date change
Detail:
string | { from: string; to: string; }dateSelect
Since 1.1.0
Datetime selection event is fired after confirm button is pressed
Detail:
{ from: string; to: string; time: string; }done
Deprecated
Use `this.dateChange`
Done event
Set `doneEventDelimiter` to null or undefine to get the typed event
Detail:
stringtimeChange
Since 1.1.0
Time change
Detail:
string