Extends
Constructor
new mw.widgets.DateInputWidget([config])
#
Create an mw.widgets.DateInputWidget object.
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object |
optional |
Configuration options Properties:
|
- Mixes in:
- Source:
Methods
blur()
#
focus()
#
getInputElement()protected
#
getMoment() → {Object}
#
getValidity() → {jQuery.Promise}
#
Get the validity of current value.
This method returns a promise that resolves if the value is valid and rejects if
it isn't. Uses #validateDate
.
Returns:
A promise that resolves if the value is valid, rejects if not.
- Type
- jQuery.Promise
setValidityFlag([isValid])
#
Sets the 'invalid' flag appropriately.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
isValid |
boolean |
optional |
Optionally override validation result |
setValue()
#
reusePreInfuseDOM()static
#
Events
deactivate(userSelected)
#
Fired when the widget is deactivated (when the calendar is closed). This can happen because the user selected a value, or because the user blurred the widget.
Parameters:
Name | Type | Description |
---|---|---|
userSelected |
boolean | Whether the deactivation happened because the user selected a value |