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

appendTo: string

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

behaviors

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

buttonTabindex: string

Tabindex of the datepicker button

clearButtonStyleClass

clearButtonStyleClass: string

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

dateFormat

dateFormat: string

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

dateStyleClasses

dateStyleClasses: null | string

Style class of the individual date elements.

dateTemplate

dateTemplate: null | DateTemplate

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

defaultDate

defaultDate: null | string | Date | Date[]

The default date that is shown when none was specified.

disabled

disabled: boolean

Whether the input is disabled.

disabledDates

disabledDates: null | string[]

List of dates that should be disabled.

disabledDays

disabledDays: null | number

List of week day indexes that should be disabled.

focusOnSelect

focusOnSelect: boolean

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

Optional formId

formId?: string

ID of the form to use for AJAX requests.

hideOnDateTimeSelect

hideOnDateTimeSelect: boolean

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

hourFormat

hourFormat: ClockConvention

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

icon

icon: string

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

id

id: string | string[]

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

inline

inline: boolean

Whether the datepicker is rendered inline or as an overlay.

inputId

inputId: null | string

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

inputStyle

inputStyle: null | string

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

inputStyleClass

inputStyleClass: null | string

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

keepInvalid

keepInvalid: boolean

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

locale

locale: Partial<PickerLocale>

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

mask

mask: string

Applies a mask using the pattern.

maskAutoClear

maskAutoClear: boolean

Clears the field on blur when incomplete input is entered

maskSlotChar

maskSlotChar: string

Placeholder in mask template.

maxDate

maxDate: null | string

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

maxDateCount

maxDateCount: null | number

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

minDate

minDate: null | string

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

monthNavigator

monthNavigator: boolean

Whether to show the month navigator

name

name: null | string

The name of this widget.

numberOfMonths

numberOfMonths: number

Number of months to display concurrently.

onBeforeHide

onBeforeHide: null | BaseCallback

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

onBeforeShow

onBeforeShow: null | BaseCallback

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

onBlur

onBlur: null | BaseEventCallback

Client side callback to execute when input element loses focus.

onChange

onChange: null | BaseEventCallback

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

onClearButtonClick

onClearButtonClick: null | BaseEventCallback

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

onFocus

onFocus: null | BaseEventCallback

Client side callback to execute when input element receives focus.

onInput

onInput: null | BaseEventCallback

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

onMonthChange

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

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

onPanelCreate

onPanelCreate: BaseCallback

Callback invoked after the datepicker panel was created.

onSelect

onSelect: null | MutationEventCallback<[Date]>

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

onTodayButtonClick

onTodayButtonClick: null | BaseEventCallback

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

onViewDateChange

onViewDateChange: null | MutationEventCallback<[Date]>

Client side callback to execute when the displayed date changes.

onYearChange

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

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

panelStyle

panelStyle: null | string

Inline style of the container element.

panelStyleClass

panelStyleClass: null | string

Style class of the container element.

placeholder

placeholder: null | string

Specifies a short hint.

postConstruct

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

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

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.

preShow

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

rangeSeparator

rangeSeparator: string

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

readOnlyInput

readOnlyInput: boolean

Whether the input is set to readonly.

required

required: boolean

Whether an input is required.

selectOtherMonths

selectOtherMonths: boolean

Enables selection of days belonging to other months.

selectionMode

selectionMode: SelectionMode

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

shortYearCutoff

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

showButtonBar: boolean

Whether to display buttons at the footer.

showIcon

showIcon: boolean

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

showMilliseconds

showMilliseconds: boolean

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

showOnFocus

showOnFocus: boolean

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

showOtherMonths

showOtherMonths: boolean

Displays days belonging to other months.

showSeconds

showSeconds: boolean

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

showTime

showTime: boolean

Specifies if the time picker should be displayed

stepHour

stepHour: number

Hour steps.

stepMillisecond

stepMillisecond: number

Millisecond steps.

stepMinute

stepMinute: number

Minute steps.

stepSecond

stepSecond: number

Second steps.

style

style: null | string

Inline style of the component.

styleClass

styleClass: null | string

Style class of the component.

tabIndex

tabIndex: null | string

Tabindex of the date picker button

timeInput

timeInput: boolean

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

timeOnly

timeOnly: boolean

Shows only time picker without date.

timeSeparator

timeSeparator: string

Separator for joining hour and minute, defaults to :.

todayButtonStyleClass

todayButtonStyleClass: string

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

touchUI

touchUI: boolean

Activates touch friendly mode

triggerButtonIcon

triggerButtonIcon: string

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

userLocale

userLocale: null | Partial<PickerLocale>

Custom localized settings for the locale.

valid

valid: boolean

Whether the current input is a valid date / time.

view

view: ViewMode

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

viewDate

viewDate: null | string | Date | Date[]

The date that is shown in the picker.

widgetVar

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

yearNavigator: boolean

Whether to show the year navigator

yearRange

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