Extends
Constructor
new mw.widgets.CalendarWidget([config])
#
Creates an mw.widgets.CalendarWidget object.
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object |
optional |
Configuration options Properties:
|
Properties
flippedPositions :Object.<string, string>static
#
Positions to flip to if there isn't room in the container for the menu in a specific direction.
Type:
Positions to flip to if there isn't room in the container for the menu in a specific direction.
Methods
getDate() → {string|null
}
#
null
}
#
Get current date, in the format 'YYYY-MM-DD' or 'YYYY-MM', depending on precision. Digits will not be localised.
Returns:
Date string
- Type
-
string
|
null
resetUI()
#
Reset the user interface of this widget to reflect selected date.
setDate([date])
#
Set the date.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
date |
string
|
null
|
optional |
null | Day or month date, in the format 'YYYY-MM-DD' or 'YYYY-MM'. When null, the calendar will show today's date, but not select it. When invalid, the date is not changed. |
setMoment(mom)
#
Set the date that is shown in the calendar, but not the selected date.
Parameters:
Name | Type | Description |
---|---|---|
mom |
Object | Moment object |