Show:

A base class for DatePickerBase.

Constructor

A.DatePickerBase

(
  • config
)

Parameters:

  • config Object

    Object literal specifying widget configuration properties.

Methods

_afterCalendarDateClick

() protected

Fires after a click in the Calendar date.

_afterCalendarSelectionChange

(
  • event
)
protected

Fires after a selection change in the Calendar.

Parameters:

  • event Object

_afterDatePickerSelectionChange

() protected

Fires when a selection change in the DatePicker.

_isSameDay

(
  • date1
  • date2
)
protected

Checks if the given dates are referencing the same day, month and year.

Parameters:

  • date1 Object
  • date2 Object

_onceUserInteractionRelease

(
  • event
)
protected

Fires when the user's first interaction happens.

Parameters:

  • event Object

_setCalendar

(
  • val
)
protected

Sets the calendar value by merging its object with another properties.

Parameters:

  • val Object

_setCalendarToFirstSelectedDate

() protected

Sets the first selected date in the Calendar.

_setPanes

(
  • val
)
Number protected

Sets the pane value between 1 and 3.

Parameters:

  • val Object

Returns:

Number:

Clamped number of panes.

clearSelection

(
  • silent
)

Clears a selection in the Calendar.

Parameters:

  • silent Object

deselectDates

(
  • dates
)

Deselects a date in the Calendar.

Parameters:

  • dates Object

getCalendar

() Calendar

Returns an existent Calendar instance or creates a new one if it doesn't exists.

Returns:

initializer

() protected

Construction logic executed during DatePickerBase instantiation. Lifecycle.

selectDates

(
  • dates
)

Selects a date in the Calendar.

Parameters:

  • dates Object

selectDatesFromInputValue

(
  • dates
)

Selects dates in the 'Calendar' while only allowing the calendar to fire 'selectionChange' once.

Parameters:

  • dates Object

useInputNode

(
  • node
)

Renders the widget in an <input> node.

Parameters:

  • node Object

Properties

ATTRS

Object static

Static property used to define the default attribute configuration for the DatePickerBase.

PANES

Array static

Lists CalendarBase pane templates.

Attributes

autoHide

Boolean

Sets the initial visibility.

Default: true

calendar

Stores the configuration of the Calendar instance.

Default: {}

live

String

Sets the aria-live attribute for the datepicker.

Default: 'assertive'

panes

Number

Defines how many panes should be rendered.

Default: 1

useARIA

Boolean

Boolean indicating if use of the WAI-ARIA Roles and States should be enabled.

Default: true