Options
All
  • Public
  • Public/Protected
  • All
Menu

The configuration for the DatePicker widget. You can access this configuration via BaseWidget.cfg. Please note that this configuration is usually meant to be read-only and should not be modified.

Hierarchy

Index

Properties

appendTo: string

The search expression for the element to which the overlay panel should be appended.

behaviors: Record<string, Behavior>

A map with all behaviors that were defined for this widget. The key is the name of the behavior, the value is the callback function that is invoked when the behavior is called.

buttonTabindex: string

Tabindex of the datepicker button

clearButtonStyleClass: string

Style class for the button that clear the selected date or time.

dateFormat: string

Date format to be used for parsing and formatting dates, such as mm/dd/yy.

dateStyleClasses: null | string

Style class of the individual date elements.

dateTemplate: null | DateTemplate

Javascript function that takes a date object and returns the content for the date cell.

defaultDate: null | string | Date | Date[]

The default date that is shown when none was specified.

disabled: boolean

Whether the input is disabled.

disabledDates: null | string[]

List of dates that should be disabled.

disabledDays: null | number

List of week day indexes that should be disabled.

enabledDates: null | string[]

List of dates that should be enabled.

focusOnSelect: boolean

When enabled, input receives focus after a value is picked.

formId?: string

ID of the form to use for AJAX requests.

hideOnDateTimeSelect: boolean

Defines if the popup should be hidden when a time is selected.

hourFormat: ClockConvention

Defines the hour format, either 12 hour mode or 24 hour mode.

icon: string

Icon of the date picker element that toggles the visibility in popup mode.

id: string | string[]

The ID of this widget, usually the ID of the DOM element.

inline: boolean

Whether the datepicker is rendered inline or as an overlay.

inputId: null | string

ID of the input element that stores the selected date or time.

inputStyle: null | string

Inline style of the input element. Used when mode is popup.

inputStyleClass: null | string

Style class of the input element. Used when mode is popup.

keepInvalid: boolean

Whether to keep the invalid inputs in the field or not.

locale: Partial<PickerLocale>

Localized strings for various messages displayed by the date or time picker.

mask: string

Applies a mask using the pattern.

maskAutoClear: boolean

Clears the field on blur when incomplete input is entered

maskSlotChar: string

Placeholder in mask template.

maxDate: null | string

Sets date picker's maximum selectable value. Also used for validation on the server-side.

maxDateCount: null | number

Defines the maximum number of selectable dates in multiple selection mode.

minDate: null | string

Sets date picker's minimum selectable value. Also used for validation on the server-side.

monthNavigator: boolean

Whether to show the month navigator

name: null | string

The name of this widget.

numberOfMonths: number

Number of months to display concurrently.

onBeforeHide: null | BaseCallback

Client side callback to execute before the date picker overlay is hidden.

onBeforeShow: null | BaseCallback

Client side callback to execute before the date picker overlay is shown.

onBlur: null | BaseEventCallback

Client side callback to execute when input element loses focus.

onChange: null | BaseEventCallback

Client side callback to execute when the selected date has changed.

onClearButtonClick: null | BaseEventCallback

Client side callback to execute when the button to clear the selected date or time was clicked.

onFocus: null | BaseEventCallback

Client side callback to execute when input element receives focus.

onInput: null | BaseEventCallback

Client side callback to execute when data was entered into the input field.

onMonthChange: null | MutationCallback<[number, number]>

Client side callback to execute when the selected month has changed.

onPanelCreate: BaseCallback

Callback invoked after the datepicker panel was created.

onSelect: null | MutationEventCallback<[Date]>

Client side callback to execute when text within input element is selected by user.

onTodayButtonClick: null | BaseEventCallback

Client side callback to execute when the button to switch to the current date was clicked.

onViewDateChange: null | MutationEventCallback<[Date]>

Client side callback to execute when the displayed date changes.

onYearChange: null | MutationCallback<[number, number]>

Client side callback to execute when the selected year has changed.

panelStyle: null | string

Inline style of the container element.

panelStyleClass: null | string

Style class of the container element.

placeholder: null | string

Specifies a short hint.

postConstruct: PostConstructCallback

An optional callback that is invoked after this widget was created successfully, at the end of the init method. This is usually specified via the widgetPostConstruct attribute on the JSF component. Note that this is also called during a refresh (AJAX update).

postRefresh: PostRefreshCallback

An optional callback that is invoked after this widget was refreshed after an AJAX update, at the end of the refresh method. This is usually specified via the widgetPostRefresh attribute on the JSF component.

preDestroy: PreDestroyCallback

An optional callback that is invoked before this widget is about to be destroyed, e.g., when the component was removed at the end of an AJAX update. This is called at the beginning of the destroy method. This is usually specified via the widgetPreDestroy attribute on the JSF component.

User-defined callback that may be overridden by the user. Invoked before the date picker overlay is shown.

rangeSeparator: string

Separator for joining start and end dates when selection mode is range, defaults to -.

readOnlyInput: boolean

Whether the input is set to readonly.

required: boolean

Whether an input is required.

selectOtherMonths: boolean

Enables selection of days belonging to other months.

Defines the selection mode, whether one or multiple dates can be selected.

shortYearCutoff: string

The cutoff year for determining the century for a date. Any dates entered with a year value less than or equal to the cutoff year are considered to be in the current century, while those greater than it are deemed to be in the previous century.

showButtonBar: boolean

Whether to display buttons at the footer.

showIcon: boolean

Whether to show an icon to display the picker in an overlay

showMilliseconds: boolean

Whether to show the milliseconds in time picker. Default is false.

showOnFocus: boolean

Whether the date picker overlay is shown when the element focused.

showOtherMonths: boolean

Displays days belonging to other months.

showSeconds: boolean

Whether to show the seconds in time picker. Default is false.

showTime: boolean

Specifies if the time picker should be displayed

stepHour: number

Hour steps.

stepMillisecond: number

Millisecond steps.

stepMinute: number

Minute steps.

stepSecond: number

Second steps.

style: null | string

Inline style of the component.

styleClass: null | string

Style class of the component.

tabIndex: null | string

Tabindex of the date picker button

timeInput: boolean

Whether an input is rendered for the time, or a text element only.

timeOnly: boolean

Shows only time picker without date.

timeSeparator: string

Separator for joining hour and minute, defaults to :.

todayButtonStyleClass: string

Style class for the button that switches to the current date.

touchUI: boolean

Activates touch friendly mode

triggerButtonIcon: string

Icon of the datepicker element that toggles the visibility in popup mode.

userLocale: null | Partial<PickerLocale>

Custom localized settings for the locale.

valid: boolean

Whether the current input is a valid date / time.

Defines the view mode, whether a date or month is to be selected.

viewDate: null | string | Date | Date[]

The date that is shown in the picker.

widgetVar: string

The name of the widget variables of this widget. The widget variable can be used to access a widget instance by calling PF("myWidgetVar").

yearNavigator: boolean

Whether to show the year navigator

yearRange: null | string

The range of years displayed in the year drop-down in (nnnn:nnnn) format such as (2000:2020). Default value is displayed_date - 10 : displayed_date + 10.

Generated using TypeDoc