Roo.util.Observable Roo.Component Roo.BoxComponent Roo.form.Field Roo.form.TextField Roo.form.TriggerField Roo.form.DateField
Package: | Roo.form |
Defined In: | Roo/form/DateField.js. |
Class: | DateField |
Extends: | Roo.form.TriggerField |
Options | Defined By | |
---|---|---|
actionMode : String
which property holds the element that used for hide() / show() / disable() / enable()
default is 'el'
which property holds the element that used for hide() / show() / disable() / enable()
default is 'el' |
Roo.Component | |
allowBlank : Boolean
False to validate that the value length > 0 (defaults to true)
False to validate that the value length > 0 (defaults to true)
|
Roo.form.TextField | |
allowDomMove : Boolean
Whether the component can move the Dom node when rendering (defaults to true).
Whether the component can move the Dom node when rendering (defaults to true).
|
Roo.Component | |
altFormats : String
Multiple date formats separated by "|" to try when parsing a user input value and it doesn't match the defined
format (defaults to 'm/d/Y|m-d-y|m-d-Y|m/d|m-d|d').
Multiple date formats separated by "|" to try when parsing a user input value and it doesn't match the defined
format (defaults to 'm/d/Y|m-d-y|m-d-Y|m/d|m-d|d'). |
Roo.form.DateField | |
autoCreate : String/Object
A DomHelper element spec, or true for a default element spec (defaults to
{tag: "input", type: "text", size: "10", autocomplete: "off"})
A DomHelper element spec, or true for a default element spec (defaults to
{tag: "input", type: "text", size: "10", autocomplete: "off"}) |
Roo.form.DateField | |
blankText : String
Error text to display if the allow blank validation fails (defaults to "This field is required")
Error text to display if the allow blank validation fails (defaults to "This field is required")
|
Roo.form.TextField | |
cls : String
A CSS class to apply to the field's underlying element.
A CSS class to apply to the field's underlying element.
|
Roo.form.Field | |
disableClass : String
CSS class added to the component when it is disabled (defaults to "x-item-disabled").
CSS class added to the component when it is disabled (defaults to "x-item-disabled").
|
Roo.Component | |
disableKeyFilter : Boolean
True to disable input keystroke filtering (defaults to false)
True to disable input keystroke filtering (defaults to false)
|
Roo.form.TextField | |
disabled : Boolean
True to disable the field (defaults to false).
True to disable the field (defaults to false).
|
Roo.form.Field | |
disabledDates : Array
An array of "dates" to disable, as strings.
An array of "dates" to disable, as strings. These strings will be used to build a dynamic regular
expression so they are very powerful. Some examples:
In order to support regular expressions, if you are using a date format that has "." in it, you will have to escape the dot when restricting dates. For example: ["03\\.08\\.03"]. |
Roo.form.DateField | |
disabledDatesText : String
The tooltip text to display when the date falls on a disabled date (defaults to 'Disabled')
The tooltip text to display when the date falls on a disabled date (defaults to 'Disabled')
|
Roo.form.DateField | |
disabledDays : Array
An array of days to disable, 0 based.
An array of days to disable, 0 based. For example, [0, 6] disables Sunday and Saturday (defaults to null).
|
Roo.form.DateField | |
disabledDaysText : String
The tooltip to display when the date falls on a disabled day (defaults to 'Disabled')
The tooltip to display when the date falls on a disabled day (defaults to 'Disabled')
|
Roo.form.DateField | |
emptyText : String
The default text to display in an empty field - placeholder.
The default text to display in an empty field - placeholder... (defaults to null).
|
Roo.form.TextField | |
fieldClass : String
The default CSS class for the field (defaults to "x-form-field")
The default CSS class for the field (defaults to "x-form-field")
|
Roo.form.Field | |
fieldLabel : String
Label to use when rendering a form.
Label to use when rendering a form.
|
Roo.form.Field | |
focusClass : String
The CSS class to use when the field receives focus (defaults to "x-form-focus")
The CSS class to use when the field receives focus (defaults to "x-form-focus")
|
Roo.form.Field | |
format : String
The default date format string which can be overriden for localization support.
The default date format string which can be overriden for localization support. The format must be
valid according to {link DateparseDate} (defaults to 'm/d/y'). |
Roo.form.DateField | |
height : Number
height (optional) size of component
height (optional) size of component
|
Roo.BoxComponent | |
hideMode : String
How this component should hidden.
How this component should hidden. Supported values are
"visibility" (css visibility), "offsets" (negative offset position) and "display" (css display) - defaults to "display". Possible Values: display, visibility |
Roo.Component | |
hideTrigger : Boolean
True to hide the trigger element and display only the base text field (defaults to false)
True to hide the trigger element and display only the base text field (defaults to false)
|
Roo.form.TriggerField | |
inputType : String
The type attribute for input fields -- e.g.
The type attribute for input fields -- e.g. radio, text, password (defaults to "text").
|
Roo.form.Field | |
invalidClass : String
The CSS class to use when marking a field invalid (defaults to "x-form-invalid")
The CSS class to use when marking a field invalid (defaults to "x-form-invalid")
|
Roo.form.Field | |
invalidText : String
The error text to display when the date in the field is invalid (defaults to
'{value} is not a valid date - it must be in the format {format}').
The error text to display when the date in the field is invalid (defaults to
'{value} is not a valid date - it must be in the format {format}'). |
Roo.form.DateField | |
listeners : Object
list of events and functions to call for this object,
For example :
list of events and functions to call for this object,
For example :
|
Roo.util.Observable | |
maskRe : String
An input mask regular expression that will be used to filter keystrokes that don't match (defaults to null)
An input mask regular expression that will be used to filter keystrokes that don't match (defaults to null)
|
Roo.form.TextField | |
maxLength : Number
Maximum input field length allowed (defaults to Number.MAX_VALUE)
Maximum input field length allowed (defaults to Number.MAX_VALUE)
|
Roo.form.TextField | |
maxLengthText : String
Error text to display if the maximum length validation fails (defaults to "The maximum length for this field is {maxLength}")
Error text to display if the maximum length validation fails (defaults to "The maximum length for this field is {maxLength}")
|
Roo.form.TextField | |
maxText : String
The error text to display when the date in the cell is after maxValue (defaults to
'The date in this field must be before {maxValue}').
The error text to display when the date in the cell is after maxValue (defaults to
'The date in this field must be before {maxValue}'). |
Roo.form.DateField | |
maxValue : Date/String
The maximum allowed date.
The maximum allowed date. Can be either a Javascript date object or a string date in a
valid format (defaults to null). |
Roo.form.DateField | |
minLength : Number
Minimum input field length required (defaults to 0)
Minimum input field length required (defaults to 0)
|
Roo.form.TextField | |
minLengthText : String
Error text to display if the minimum length validation fails (defaults to "The minimum length for this field is {minLength}")
Error text to display if the minimum length validation fails (defaults to "The minimum length for this field is {minLength}")
|
Roo.form.TextField | |
minText : String
The error text to display when the date in the cell is before minValue (defaults to
'The date in this field must be after {minValue}').
The error text to display when the date in the cell is before minValue (defaults to
'The date in this field must be after {minValue}'). |
Roo.form.DateField | |
minValue : Date/String
The minimum allowed date.
The minimum allowed date. Can be either a Javascript date object or a string date in a
valid format (defaults to null). |
Roo.form.DateField | |
msgFx : String
Experimental The effect used when displaying a validation message under the field (defaults to 'normal').
Experimental The effect used when displaying a validation message under the field (defaults to 'normal').
|
Roo.form.Field | |
msgTarget : String
The location where error text should display.
The location where error text should display. Should be one of the following values (defaults to 'qtip'):
|
Roo.form.Field | |
name : String
The field's HTML name attribute.
The field's HTML name attribute.
|
Roo.form.Field | |
qtip : String
Mouse over tip
Mouse over tip
|
Roo.form.Field | |
readOnly : Boolean
True to mark the field as readOnly in HTML (defaults to false) -- Note: this only sets the element's readOnly DOM attribute.
True to mark the field as readOnly in HTML (defaults to false) -- Note: this only sets the element's readOnly DOM attribute.
|
Roo.form.Field | |
regex : RegExp
A JavaScript RegExp object to be tested against the field value during validation (defaults to null).
A JavaScript RegExp object to be tested against the field value during validation (defaults to null).
If available, this regex will be evaluated only after the basic validators all return true, and will be passed the current field value. If the test fails, the field will be marked invalid using {link regexText}. |
Roo.form.TextField | |
regexText : String
The error text to display if {link regex} is used and the test fails during validation (defaults to "")
The error text to display if {link regex} is used and the test fails during validation (defaults to "")
|
Roo.form.TextField | |
selectOnFocus : Boolean
True to automatically select any existing field text when the field receives input focus (defaults to false)
True to automatically select any existing field text when the field receives input focus (defaults to false)
|
Roo.form.TextField | |
tabIndex : Number
The tabIndex for this field.
The tabIndex for this field. Note this only applies to fields that are rendered, not those which are built via applyTo (defaults to undefined).
|
Roo.form.Field | |
triggerClass : String
An additional CSS class used to style the trigger button.
An additional CSS class used to style the trigger button. The trigger will always get the
class 'x-form-trigger' and triggerClass will be appended if specified (defaults to 'x-form-date-trigger' which displays a calendar icon). |
Roo.form.DateField | |
useIso : Boolean
if enabled, then the date field will use a hidden field to store the
real value as iso formated date.
if enabled, then the date field will use a hidden field to store the
real value as iso formated date. default (false) |
Roo.form.DateField | |
validateOnBlur : Boolean
Whether the field should validate when it loses focus (defaults to true).
Whether the field should validate when it loses focus (defaults to true).
|
Roo.form.Field | |
validationDelay : Number
The length of time in milliseconds after user input begins until validation is initiated (defaults to 250)
The length of time in milliseconds after user input begins until validation is initiated (defaults to 250)
|
Roo.form.Field | |
validationEvent : String/Boolean
The event that should initiate field validation.
The event that should initiate field validation. Set to false to disable
automatic validation (defaults to "keyup"). |
Roo.form.Field | |
validator : Function
A custom validation function to be called during field validation (defaults to null).
A custom validation function to be called during field validation (defaults to null).
If available, this function will be called only after the basic validators all return true, and will be passed the current field value and expected to return boolean true if the value is valid or a string error message if invalid. |
Roo.form.TextField | |
value : Mixed
A value to initialize this field with.
A value to initialize this field with.
|
Roo.form.Field | |
vtype : String
A validation type name as defined in {link Roo.form.VTypes} (defaults to null)
A validation type name as defined in {link Roo.form.VTypes} (defaults to null)
|
Roo.form.TextField | |
width : Number
width (optional) size of component
width (optional) size of component
|
Roo.BoxComponent |
Method | Defined By | |
---|---|---|
new Roo.form.DateField
(Object config)
Create a new Roo.form.DateField
Create a new Roo.form.DateField
|
||
addEvents
(Object object)
Used to define events on this Observable
Used to define events on this Observable
|
Roo.util.Observable | |
Appends an event handler to this component
Appends an event handler to this component
|
Roo.util.Observable | |
applyTo
(String/HTMLElement/Element el)
:
Roo.form.Field
Apply the behaviors of this component to an existing element.
Apply the behaviors of this component to an existing element. This is used instead of render().
|
Roo.form.Field | |
autoSize
()
|
Roo.form.TriggerField | |
clearInvalid
()
Clear any invalid styles/messages for this field
Clear any invalid styles/messages for this field
|
Roo.form.Field | |
destroy
()
Destroys this component by purging any event listeners, removing the component's element from the DOM,
removing the component from its {link Roo.Container} (if applicable) and unregistering it from {link Roo.ComponentMgr}.
Destroys this component by purging any event listeners, removing the component's element from the DOM,
removing the component from its {link Roo.Container} (if applicable) and unregistering it from {link Roo.ComponentMgr}. |
Roo.Component | |
disable
()
:
Roo.Component
Disable this component.
Disable this component.
|
Roo.Component | |
enable
()
:
Roo.Component
Enable this component.
Enable this component.
|
Roo.Component | |
Fires the specified event with the passed parameters (minus the event name).
|
Roo.util.Observable | |
focus
(Boolean selectText)
:
Roo.Component
Try to focus this component.
Try to focus this component.
|
Roo.Component | |
getBox
(Boolean local)
Gets the current box measurements of the component's underlying element.
Gets the current box measurements of the component's underlying element.
|
Roo.BoxComponent | |
getEl
()
:
Roo.Element
Returns the underlying {link Roo.Element}.
Returns the underlying {link Roo.Element}.
|
Roo.Component | |
getId
()
:
String
Returns the id of this component.
Returns the id of this component.
|
Roo.Component | |
getName
()
:
String
Returns the name attribute of the field if available
Returns the name attribute of the field if available
|
Roo.form.Field | |
Gets the current XY position of the component's underlying element.
|
Roo.BoxComponent | |
getRawValue
()
:
Mixed
Returns the raw data value which may or may not be a valid, defined value.
Returns the raw data value which may or may not be a valid, defined value. To return a normalized value see {link getValue}.
|
Roo.form.Field | |
getSize
()
:
Object
Gets the current size of the component's underlying element.
Gets the current size of the component's underlying element.
|
Roo.BoxComponent | |
getValue
()
:
Date
Returns the current date value of the date field.
Returns the current date value of the date field.
|
Roo.form.DateField | |
hasChanged
()
checks the current value against the 'loaded' value.
checks the current value against the 'loaded' value.
Note - will return false if 'resetHasChanged' has not been called first. |
Roo.form.Field | |
Roo.util.Observable | ||
hide
()
:
Roo.Component
Hide this component.
Hide this component.
|
Roo.Component | |
isDirty
()
Returns true if this field has been changed since it was originally loaded and is not disabled.
Returns true if this field has been changed since it was originally loaded and is not disabled.
DEPRICATED - it never worked well - use hasChanged/resetHasChanged. |
Roo.form.Field | |
Roo.form.Field | ||
isVisible
()
Returns true if this component is visible.
Returns true if this component is visible.
|
Roo.Component | |
markInvalid
(String msg)
Mark this field as invalid
Mark this field as invalid
|
Roo.form.Field | |
Appends an event handler to this element (shorthand for addListener)
Appends an event handler to this element (shorthand for addListener)
|
Roo.util.Observable | |
Called after the component is moved, this method is empty by default but can be implemented by any
subclass that needs to perform custom logic after a move occurs. |
Roo.BoxComponent | |
Called after the component is resized, this method is empty by default but can be implemented by any
subclass that needs to perform custom logic after a resize occurs.
Called after the component is resized, this method is empty by default but can be implemented by any
subclass that needs to perform custom logic after a resize occurs. |
Roo.BoxComponent | |
onTriggerClick
(EventObject e)
The function that should handle the trigger's click event.
The function that should handle the trigger's click event. This method does nothing by default until overridden
by an implementing function.
|
Roo.form.TriggerField | |
purgeListeners
()
Removes all listeners for this object
Removes all listeners for this object
|
Roo.util.Observable | |
Roo.util.Observable | ||
render
(String/HTMLElement/Element container)
If this is a lazy rendering component, render it to its container element.
If this is a lazy rendering component, render it to its container element.
|
Roo.Component | |
reset
()
Resets the current field value to the originally-loaded value and clears any validation messages.
Resets the current field value to the originally-loaded value and clears any validation messages.
|
Roo.form.TextField | |
resetHasChanged
()
stores the current value in loadedValue
stores the current value in loadedValue
|
Roo.form.Field | |
Roo.form.TextField | ||
setDisabled
(Boolean disabled)
Convenience function for setting disabled/enabled by boolean.
Convenience function for setting disabled/enabled by boolean.
|
Roo.Component | |
Roo.BoxComponent | ||
Roo.BoxComponent | ||
setRawValue
(Mixed value)
Sets the underlying DOM field's value directly, bypassing validation.
Sets the underlying DOM field's value directly, bypassing validation. To set the value with validation see {link setValue}.
|
Roo.form.Field | |
Sets the width and height of the component.
Sets the width and height of the component. This method fires the resize event. This method can accept
either width and height as separate numeric arguments, or you can pass a size object like {width:10, height:20}.
|
Roo.BoxComponent | |
setValue
(String/Date date)
Sets the value of the date field.
Sets the value of the date field. You can pass a date object or any string that can be parsed into a valid
date, using DateField.format as the date format, according to the same rules as {link DateparseDate} (the default format used is "m/d/y"). Usage:
|
Roo.form.DateField | |
setVisible
(Boolean visible)
:
Roo.Component
Convenience function to hide or show this component by boolean.
Convenience function to hide or show this component by boolean.
|
Roo.Component | |
show
()
:
Roo.Component
Show this component.
Show this component.
|
Roo.Component | |
syncSize
()
Force the component's size to recalculate based on the underlying element's current height and width.
Force the component's size to recalculate based on the underlying element's current height and width.
|
Roo.BoxComponent | |
Roo.util.Observable | ||
updateBox
(Object box)
Sets the current box measurements of the component's underlying element.
Sets the current box measurements of the component's underlying element.
|
Roo.BoxComponent | |
validate
()
:
Boolean
Validates the field value
Validates the field value
|
Roo.form.Field | |
validateValue
(Mixed value)
:
Boolean
Validates a value according to the field's validation rules and marks the field as invalid
if the validation fails
Validates a value according to the field's validation rules and marks the field as invalid
if the validation fails
|
Roo.form.TextField |
Event | Defined By | |
---|---|---|
autosize (Roo.form.Field this, Number width)
Fires when the autosize function is triggered.
Fires when the autosize function is triggered. The field may or may not have actually changed size
according to the default logic, but this event provides a hook for the developer to apply additional logic at runtime to resize the field if needed.
|
Roo.form.TextField | |
beforedestroy (Roo.Component this)
Fires before the component is destroyed.
Fires before the component is destroyed. Return false to stop the destroy.
|
Roo.Component | |
beforehide (Roo.Component this)
Fires before the component is hidden.
Fires before the component is hidden. Return false to stop the hide.
|
Roo.Component | |
beforerender (Roo.Component this)
Fires before the component is rendered.
Fires before the component is rendered. Return false to stop the render.
|
Roo.Component | |
beforeshow (Roo.Component this)
Fires before the component is shown.
Fires before the component is shown. Return false to stop the show.
|
Roo.Component | |
blur (Roo.form.Field this)
Fires when this field loses input focus.
Fires when this field loses input focus.
|
Roo.form.Field | |
change (Roo.form.Field this, Mixed newValue, Mixed oldValue)
Fires just before the field blurs if the field value has changed.
Fires just before the field blurs if the field value has changed.
|
Roo.form.Field | |
destroy (Roo.Component this)
Fires after the component is destroyed.
Fires after the component is destroyed.
|
Roo.Component | |
disable (Roo.Component this)
Fires after the component is disabled.
Fires after the component is disabled.
|
Roo.Component | |
enable (Roo.Component this)
Fires after the component is enabled.
Fires after the component is enabled.
|
Roo.Component | |
focus (Roo.form.Field this)
Fires when this field receives input focus.
Fires when this field receives input focus.
|
Roo.form.Field | |
hide (Roo.Component this)
Fires after the component is hidden.
Fires after the component is hidden.
|
Roo.Component | |
invalid (Roo.form.Field this, String msg)
Fires after the field has been marked as invalid.
Fires after the field has been marked as invalid.
|
Roo.form.Field | |
keyup (Roo.form.Field this, Roo.EventObject e)
Fires after the key up
Fires after the key up
|
Roo.form.Field | |
Fires after the component is moved.
Fires after the component is moved.
|
Roo.BoxComponent | |
render (Roo.Component this)
Fires after the component is rendered.
Fires after the component is rendered.
|
Roo.Component | |
Fires after the component is resized.
Fires after the component is resized.
|
Roo.BoxComponent | |
select (Roo.form.DateField combo, Date date)
Fires when a date is selected
Fires when a date is selected
|
Roo.form.DateField | |
show (Roo.Component this)
Fires after the component is shown.
Fires after the component is shown.
|
Roo.Component | |
specialkey (Roo.form.Field this, Roo.EventObject e)
Fires when any key related to navigation (arrows, tab, enter, esc, etc.
Fires when any key related to navigation (arrows, tab, enter, esc, etc.) is pressed. You can check
{link Roo.EventObjectgetKey} to determine which key was pressed.
|
Roo.form.Field | |
valid (Roo.form.Field this)
Fires after the field has been validated with no errors.
Fires after the field has been validated with no errors.
|
Roo.form.Field |