Class: SC.DateFieldView

Extends SC.TextFieldView.

A Date field add behaviour to the Text Field to support date management, for example, disabling deletion, and special behaviour to tabs commands.

This field view is tightly integrated with SC.DateTime

By default the Date Field View show Date only, but if you need to show the Time do:

  showTime: YES,
  valueBinding: '...'

and if you only need to show time:

  showTime: YES,
  showDate: NO,
  valueBinding: '...'

Example usage with special format:

  formatDate: '%d %b of %Y',
  valueBinding: '...'

You can override these format as you like, but has some limitations, actually only support these KEY from SC.DateTime:

%a %b %d %H %I %j %m %M %p %S %U %W %y %Y

These are keys that has FIXED length, so we can control the selection and tabing.

Defined in: date_field.js

SproutCore 1.0

Field Summary

Fields borrowed from SC.TextFieldView:
allowsErrorAsValue, applyImmediately, autoCapitalize, autoComplete, autoCorrect, autoResizePadding, commitOnBlur, defaultTabbingEnabled, focused, formattedHint, hint, hintOnFocus, isBrowserFocusable, isContextMenuEnabled, isEditable, isEditing, isTextArea, isTextField, leftAccessoryView, localize, maxLength, rightAccessoryView, selection, shouldRenderBorder, spellCheckEnabled, supportsAutoResize, type, useHintOverlay
Fields borrowed from SC.View:
acceptsMultitouch, ariaHidden, ariaRole, attributeBindings, autoMixins, backgroundColor, childViewLayout, childViewLayoutOptions, childViews, childViewsNeedLayout, classNameBindings, classNames, concatenatedProperties, createdByParent, designMode, displayProperties, enabledState, firstKeyView, hasLayout, hasTouch, hasVisibility, isBuildingIn, isBuildingOut, isChildViewLayoutLive, isEnabled, isFixedHeight, isFixedPosition, isFixedSize, isFixedWidth, isKeyResponder, isTextSelectable, isView, isVisible, lastKeyView, layerLocationNeedsUpdate, layerNeedsUpdate, layout, modeAdjust, nextKeyView, page, pane, parentView, previousKeyView, renderDelegateName, shouldInheritCursor, shouldInheritEnabled, tagName, themeName, toolTip, touchBoundary, transitionAdjust, transitionAdjustOptions, transitionHide, transitionHideOptions, transitionIn, transitionInOptions, transitionOut, transitionOutOptions, transitionShow, transitionShowOptions, useStaticLayout
Fields borrowed from SC.Responder:
hasFirstResponder, isFirstResponder, responderContext
Fields borrowed from SC.Object:
isDestroyed, isObject, nextProperty, object, property, target, toInvalidate
Fields borrowed from SC.Observable:
Fields borrowed from SC.Control:
controlSize, errorLabel, fieldKey, fieldLabel, isActive, isControl, isSelected

Field Detail

allowNumericInput Boolean

Set this to NO to disallow the default keyboard handling, which attempts to convert numeric keystrokes into valid dates.

Default value:
format String
The current format to apply for Validator and to show.
formatDate String
Default value:
formatDateTime String
Default value:
'%d/%m/%Y %I:%M %p'
formatTime String
Default value:
'%I:%M %p'
showDate Boolean
Default value:
showTime Boolean
Default value:
tabsSelections SC.Array
Array of Key/TextSelection found for the current format.
validator SC.Validator.DateTime
The current validator to format the Date to the input field and vice versa.
value String
Default value:
Documentation generated by JsDoc Toolkit 2.4.0 on Wed Apr 08 2015 10:02:20 GMT-0600 (CST)