Skip to content

SiDatepickerComponent documentation

selector
si-datepicker

Input Properties

NameTypeDefaultDescription
activeHover
CellThe cell which which has the mouse hover.
calenderWeekLabel
TranslatableString$localize`:@@SI_DATEPICKER.CALENDAR_WEEK_LABEL:Calendar week`Aria label for week number column
config
DatepickerConfig{}Object to configure the datepicker.
date
DateThe selected date of the datepicker. Use for initialization and for bidirectional binding.
dateRange
DateRangeThe selected date range of the datepicker. Use for initialization and for bidirectional binding.
dateRangeRole
RangeType
disabledTime
booleanfalseDisabled the optional visible time picker.
focusedDate
DateThe date which is currently focused Compare to the selected date or range the calendar requires to have one element to focus.
hideCalendar
booleanfalse
hideTimeToggle
booleanfalseOption to hide the time switch.
initialFocus
booleanfalseSet initial focus to calendar body.
maxMonth
DateOptional input to control the maximum month the datepicker can show and the user can navigate. The maxMonth can be smaller than the maxDate This option enables the usage of multiple datepickers next to each other while the more left calendar always shows a earlier month the the more right one.
minMonth
DateOptional input to control the minimum month the datepicker can show and the user can navigate. The minMonth can be larger than the minDate This option enables the usage of multiple datepickers next to each other while the more left calendar always shows a earlier month the the more right one.
nextLabel
TranslatableString$localize`:@@SI_DATEPICKER.NEXT:Next`Aria label for the next button. Needed for a11y.
previousLabel
TranslatableString$localize`:@@SI_DATEPICKER.PREVIOUS:Previous`Aria label for the previous button. Needed for a11y.
rangeType
RangeType'START'Use this to force date range operation to select either start date or end date.
time12h
booleanundefinedEnable/disable 12H mode in timepicker. Defaults to locale
timepickerLabel
stringOptional timepicker label.

Output Properties

NameTypeDescription
activeHoverChange
CellThe cell which which has the mouse hover.
configChange
DatepickerConfigObject to configure the datepicker.
dateChange
DateThe selected date of the datepicker. Use for initialization and for bidirectional binding.
dateRangeChange
DateRangeThe selected date range of the datepicker. Use for initialization and for bidirectional binding.
disabledTimeChange
booleanDisabled the optional visible time picker.
focusedDateChange
DateThe date which is currently focused Compare to the selected date or range the calendar requires to have one element to focus.
rangeTypeChange
RangeTypeUse this to force date range operation to select either start date or end date.

Attributes and Methods

NameTypeDefaultDescription
focusActiveCell()
() => voidFocus the active cell in view. The function is required to transfer the focus from input to the active date cell.

Types Documentation

Represents a translatable string. This can either be a translation key, e.g. ACTIONS.EDIT that will be automatically translated when displayed on the UI or a pre-translated string, e.g. Edit . Equivalent to a normal string in usage and functionality.
Properties
Defines the time is disabled when visible. Will also be updated on user change. Default is false .
disabledTime?: boolean
Text or translation key for the disabled disable time. Default is Ignore time .
disabledTimeText?: TranslatableString
Options to turn on date range selection.
enableDateRange?: boolean
Text or translation key for the enabled disable time. Default is Consider time .
enabledTimeText?: TranslatableString
Consider time with minDate and maxDate
enableTimeValidation?: boolean
Option to use two months view for date range picking.
enableTwoMonthDateRange?: boolean
endTimeLabel?: string
hideLabels?: boolean
Configuration for hiding week numbers. Default is false .
hideWeekNumbers?: boolean
hoursAriaLabel?: string
hoursLabel?: string
hoursPlaceholder?: string
Hides disable time switch in the timepicker part and includes mandatory the time in the picker.
mandatoryTime?: boolean
Maximal (latest) selectable date.
maxDate?: Date
meridians?: string[]
meridiansAriaLabel?: string
meridiansLabel?: string
millisecondsAriaLabel?: string
millisecondsLabel?: string
millisecondsPlaceholder?: string
Minimal (earliest) selectable date.
minDate?: Date
minutesAriaLabel?: string
minutesLabel?: string
minutesPlaceholder?: string
Only month and year are selectable.
onlyMonthSelection?: boolean
secondsAriaLabel?: string
secondsLabel?: string
secondsPlaceholder?: string
Defines the timepicker milliseconds visibility . Default is false .
showMilliseconds?: boolean
Defines the timepicker minutes visibility. Default is true .
showMinutes?: boolean
Defines the timepicker seconds visibility . Default is false .
showSeconds?: boolean
Defines the timepicker visibility. Default is false .
showTime?: boolean
startTimeLabel?: string
Text or translation key for today button title. Default is Today .
todayText?: TranslatableString
Defines the starting day of the week. Default is monday .
weekStartDay?: WeekStart
("START" | "END" | undefined)
Translatable
import
("monday" | "saturday" | "sunday" | undefined)

Except where otherwise noted, content on this site is licensed under MIT License.