Class: Date

jala.Form.Component.Date(name)

Subclass of jala.Form.Component.Input which renders and validates a date editor.

Constructor

new Date(name)

Constructs a new Date component instance
Parameters:
Name Type Description
name String Name of the component, used as name of the html controls.
Source:
Returns:
A newly created Date component

Methods

checkRequirements(reqData)

Validates user input from a date editor.
Parameters:
Name Type Description
reqData Object request data
Source:
Returns:
null if everything is ok or string containing error message

getDateFormat()

Returns the date format for this component.
Source:
Returns:
date format object

parseValue(reqData)

Parses the string input from the form and converts it to a date object. Throws an error if the string cannot be parsed.
Parameters:
Name Type Description
reqData Object request data
Source:
Returns:
parsed date value

renderControls(attr, value, reqData)

Renders a textarea tag to the response.
Parameters:
Name Type Description
attr Object Basic attributes for this element.
value Object Value to be used for rendering this element.
reqData Object Request data for the whole form. This argument is passed only if the form is re-rendered after an error occured.
Source:

setDateFormat(newDateFormat)

Sets the date format for this component.
Parameters:
Name Type Description
newDateFormat String new date format
Source: