new DateWidget()
- Source:
Extends
- XV.Input
Methods
-
applyTimezoneOffset()
-
This function strips the time from a valid date and mimics the model's action of offseting the time by the timezone for the sake of what the user sees populated in the input box. This action is undone just before the value is set into the model.
- Source:
-
datePicked()
-
This function handles a date chosen via the datepicker versus text entered into the input field.
- Source:
-
getValueToString()
-
Returns the value in the input field of the widget.
- Source:
-
iconTapped()
-
This function handles the click of the calendar icon that opens the datepicker.
- Source:
-
setValue(value, options)
-
Sets the value of date programatically.
Parameters:
Name Type Description value
Date | String Can be Date or Date String options
Object - Source:
-
textToDate()
-
This function takes the value entered into a DateWidget and returns the correct date object for this value. If the value does not correspond to a valid date, the function returns false.
- Source:
-
validate()
-
This function calls textToDate, which converts the text to a valid date, if possible.
- Source:
-
valueChanged()
-
This function puts the date in the correct format based on the locale set in Globalize. It also puts back the timezoneoffset that was done in the validation function before it sends the value to the model.
- Source: