inputEx-library

inputEx  0.7.1

inputEx-library > inputEx > inputEx.DateField
Search:
 
Filters

Class inputEx.DateField - extends inputEx.StringField

Known Subclasses:
inputEx.DatePickerField
A Date Field.

Constructor

inputEx.DateField ( options )
Parameters:
options <Object> Add the folowing options:
  • dateFormat: Editor format (the one which is presented to the user) default to 'm/d/Y'
  • valueFormat: if falsy, the field will return a javascript Date instance. Otherwise, this format will be used for input parsing/output formatting

Properties inherited from inputEx.Field:

Methods

formatDate

void formatDate ( )
Those methods are limited but largely enough for our usage

getValue

String || Date getValue ( forceDate )
Return the date
Parameters:
forceDate <Boolean> Skip the valueFormat option if set to truthy
Returns: String || Date
Formatted date using the valueFormat or a javascript Date instance

parseWithFormat

void parseWithFormat ( )
Those methods are limited but largely enough for our usage

setOptions

void setOptions ( options )
Adds the 'inputEx-DateField' default className
Parameters:
options <Object> Options object as passed to the constructor

setValue

void setValue ( val , [sendUpdatedEvt] )
Format the date according to options.dateFormat
Parameters:
val <Date> Date to set
[sendUpdatedEvt] <boolean> (optional) Wether this setValue should fire the updatedEvt or not (default is true, pass false to NOT send the event)

validate

void validate ( )
Specific Date validation depending of the 'format' option

Events inherited from inputEx.Field:


Copyright © 2011 Eric Abouaf All rights reserved.