Extends
Constructor
new mw.widgets.datetime.CalendarWidget([config])
#
Create an instance of mw.widgets.CalendarWidget
.
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object |
optional |
Configuration options Properties:
|
- Mixes in:
- Source:
Methods
adjustDate(date, component, delta, [enforceRange]) → {Date}protected
#
onDayClick(button)protected
#
onDocumentMouseDown(e)protected
#
Handles document mouse down events.
Parameters:
Name | Type | Description |
---|---|---|
e |
jQuery.Event | Mouse down event |
onKeyDown(e) → {boolean|undefined
}protected
#
undefined
}protected
#
Handles key presses.
Parameters:
Name | Type | Description |
---|---|---|
e |
jQuery.Event | Key down event |
Returns:
False to cancel the default event
- Type
-
boolean
|
undefined
onLocalChange()protected
#
Handles formatter 'local' flag changing.
onNextClick()protected
#
Handles next button click.
onPrevClick()protected
#
Handles previous button click.
setFocusedDate(date) → {mw.widgets.datetime.CalendarWidget}chainable
#
setSelected(dates) → {mw.widgets.datetime.CalendarWidget}chainable
#
Set the selected dates.
Parameters:
Returns:
Fires:
toggle()
#
updateUI()protected
#
Update the user interface.
Events
change(dates)
#
A change
event is emitted when the selected dates change.
Parameters:
change
event is emitted when the selected dates change.
focusChanged(date)
#
A focusChanged
event is emitted when the focused date changes.
Parameters:
Name | Type | Description |
---|---|---|
date |
Date | The newly focused date |
focusChanged
event is emitted when the focused date changes.