ECalendar Calendar
Examples
Date ranges and custom date cells
Calendar
Properties
calendarLocalevarLocale used for date/time parsing, formatting and panels.
Show default value
Qt.locale(PickerFormats.localeName( EControlConfig.valueFor(control, "locale", ELocale.language), ELocale.language ))cellComponentComponentComponent slot for custom table cell or date cell; null uses the default content. See this page’s examples for delegate context.
nullcontrollerTypestringMonth navigation control style.
"button" / "select""none"
"button"dateCellDelegateComponentComponent slot for custom calendar date cell; null uses the default content. See this page’s examples for delegate context.
nulldisabledDatevarDate disabling callback receiving a JavaScript Date and returning whether it is disabled.
nullenabledboolAllow interaction; false disables the control.
truefixedViewboolLock the date panel view instead of switching levels through its title.
falsefocusedDatedateDate focused by keyboard navigation in the date panel.
new Date(year, month, 1)formattervarFormatting callback converting a value to displayed text.
nullheaderDelegateComponentComponent slot for custom header; null uses the default content. See this page’s examples for delegate context.
nullheightrealComponent size in pixels; may be bound to its parent layout.
implicitHeighthoverValuestringHovered date or rating used for preview.
""maxDatestringSelectable date bounds in yyyy-MM-dd; an empty string imposes no bound.
""minDatestringSelectable date bounds in yyyy-MM-dd; an empty string imposes no bound.
""monthintDisplayed month from 1 to 12.
new Date().getMonth()nextMonthIconintIcon used by the component.
EIcons.*
0 (no icon)
EIcons.CHEVRON_RIGHTnextYearIconintIcon used by the component.
EIcons.*
0 (no icon)
EIcons.CHEVRONS_RIGHTprevMonthIconintIcon used by the component.
EIcons.*
0 (no icon)
EIcons.CHEVRON_LEFTprevYearIconintIcon used by the component.
EIcons.*
0 (no icon)
EIcons.CHEVRONS_LEFTrangevarCalendar display range as a start/end date array.
[]rangeStartstringStart of the date range being selected.
""showConfirmboolShow the confirm button.
falseshowWeekNumberboolShow week numbers.
falsesizeintControl size; inherits the nearest EConfigProvider by default.
EStyle.SmallEStyle.MediumEStyle.Large
Inherited; EStyle.Medium by defaulttypestringDate selection unit and single, multiple or range selection mode.
"date" / "dates""week" / "month""months" / "year""years" / "quarter""quarters" / "daterange""monthrange" / "yearrange""quarterrange"
"date"valuevarSelected date in yyyy-MM-dd; month, year or range panels use the corresponding format.
""viewModestringDate level currently displayed in the panel.
"date" / "month""year"
Show default value
type.indexOf("year") === 0 ? "year" : type.indexOf("month") === 0 || type.indexOf("quarter") === 0 ? "month" : "date"visibleboolWhether the component is visible.
truewidthrealComponent size in pixels; may be bound to its parent layout.
implicitWidthyearintDisplayed year.
new Date().getFullYear()displayedMonthsintRead onlyMonth data displayed within the calendar range.
Computed at runtimeperiodViewboolRead onlyWhether the date panel shows month or year periods.
Computed at runtimeselectedDatevarRead onlyCurrent selected Date parsed by the date panel.
Computed at runtimeselectedDayvarRead onlyCurrently selected calendar day.
Computed at runtimevalidatedRangevarRead onlyValidated start/end dates of the calendar range.
Computed at runtimeSignals
picked(var value)Emitted after choosing a value; value is the chosen value.
calendarChanged(var value)Emitted when the calendar selection changes; value is the current selection.
panelChanged(var date, string mode)Emitted when the calendar view changes; date is the displayed date and mode is the view mode.
dateSelected(string value)Emitted after selecting a date; value contains the selected date.
Methods
focusCalendar()Move keyboard focus to the calendar.
setView(date)Change the displayed calendar position to date.
shiftMonth(offset)Shift the displayed calendar by offset months; negative values move backward.
selectDate(input)Select the date specified by input.