new mw.widgets.DateInputWidget(configopt)
#
Creates an mw.widgets.DateInputWidget object.
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object |
<optional> |
Configuration options Properties
|
- Mixes In:
- Source:
Extends
Methods
blur()
#
focus()
#
getInputElement()protected
#
getMoment() → {Object}
#
Get the Moment object for current value.
Returns:
Moment object
- Type
- 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(isValidopt)
#
Sets the 'invalid' flag appropriately.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
isValid |
boolean |
<optional> |
Optionally override validation result |
setValue()
#
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 |