com.smartgwt.client.widgets.form.fields
Class DateTimeItem

java.lang.Object
  extended by com.smartgwt.client.core.JsObject
      extended by com.smartgwt.client.core.DataClass
          extended by com.smartgwt.client.core.RefDataClass
              extended by com.smartgwt.client.widgets.form.fields.FormItem
                  extended by com.smartgwt.client.widgets.form.fields.DateItem
                      extended by com.smartgwt.client.widgets.form.fields.DateTimeItem
All Implemented Interfaces:
HasHandlers, HasBlurHandlers, HasChangedHandlers, HasChangeHandlers, HasClickHandlers, HasDoubleClickHandlers, HasFocusHandlers, HasIconClickHandlers, HasIconKeyPressHandlers, HasItemHoverHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasKeyUpHandlers, HasTitleHoverHandlers

public class DateTimeItem
extends DateItem

Subclass of DateItem for manipulating FieldType.


Field Summary
 
Fields inherited from class com.smartgwt.client.core.JsObject
jsObj
 
Constructor Summary
DateTimeItem()
           
DateTimeItem(JavaScriptObject jsObj)
           
DateTimeItem(String name)
           
DateTimeItem(String name, String title)
           
 
Method Summary
 DateDisplayFormat getDisplayFormat()
          This property can be used to customize the format in which datetimes are displayed.
Should be set to a standard DateDisplayFormat or a function which will return a formatted date time string.
 String getInputFormat()
          If useTextField is true this property can be used to specify the input format for date strings.
static DateTimeItem getOrCreateRef(JavaScriptObject jsObj)
           
 Boolean getUseTextField()
          DateTimeItems show datetime values in a freeform text entry area.
 void setDisplayFormat(DateDisplayFormat displayFormat)
          This property can be used to customize the format in which datetimes are displayed.
Should be set to a standard DateDisplayFormat or a function which will return a formatted date time string.
 void setInputFormat(String inputFormat)
          If useTextField is true this property can be used to specify the input format for date strings.
 void setUseTextField(Boolean useTextField)
          DateTimeItems show datetime values in a freeform text entry area.
 
Methods inherited from class com.smartgwt.client.widgets.form.fields.DateItem
deselectValue, deselectValue, getCenturyThreshold, getEndDate, getEnforceDate, getInvalidDateStringMessage, getPickerIconPrompt, getSelectionRange, getSelectorFormat, getStartDate, getTextAlign, selectValue, setCenturyThreshold, setDateFormatter, setEndDate, setEnforceDate, setInvalidDateStringMessage, setMaskDateSeparator, setPickerIconPrompt, setSelectionRange, setSelectorFormat, setStartDate, setTextAlign, setUseMask
 
Methods inherited from class com.smartgwt.client.widgets.form.fields.FormItem
addBlurHandler, addChangedHandler, addChangeHandler, addClickHandler, addDoubleClickHandler, addFocusHandler, addIconClickHandler, addIconKeyPressHandler, addItemHoverHandler, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addTitleHoverHandler, blurItem, clearValue, disable, enable, focusInItem, getAccessKey, getAlign, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsString, getCellStyle, getConfig, getCriteriaField, getCriterion, getDataPath, getDateFormatter, getDefaultIconSrc, getDisabled, getDisplayField, getDisplayFieldName, getDisplayValue, getDisplayValue, getEmptyDisplayValue, getEmptyValueIcon, getEndRow, getErrorIconHeight, getErrorIconSrc, getErrorIconWidth, getErrorMessageWidth, getFetchMissingValues, getFieldName, getFilterLocally, getForm, getGlobalTabIndex, getHeight, getHint, getHintStyle, getHoverAlign, getHoverDelay, getHoverHeight, getHoverOpacity, getHoverStyle, getHoverVAlign, getHoverWidth, getIconHeight, getIconPageRect, getIconPrompt, getIconRect, getIconVAlign, getIconWidth, getImageURLPrefix, getImageURLSuffix, getLeft, getName, getOperator, getOptionCriteria, getOptionFilterContext, getOptionOperationId, getPickerIconHeight, getPickerIconSrc, getPickerIconWidth, getPrompt, getRejectInvalidValueOnChange, getRequired, getRowSpan, getSelectOnFocus, getShouldSaveValue, getShowDisabled, getShowErrorIcon, getShowErrorStyle, getShowErrorText, getShowFocused, getShowFocusedIcons, getShowFocusedPickerIcon, getShowHint, getShowIcons, getShowOverIcons, getShowPickerIcon, getShowTitle, getShowValueIconOnly, getStartRow, getSuppressValueIcon, getTabIndex, getTextBoxStyle, getTimeFormatter, getTitle, getTitleAlign, getTitleOrientation, getTitleStyle, getTooltip, getTop, getType, getValidateOnChange, getValue, getValueField, getValueFieldName, getValueIconHeight, getValueIconLeftPadding, getValueIconRightPadding, getValueIconSize, getValueIconWidth, getVisible, getWidth, getWrapTitle, hide, isCreated, isDisabled, isDrawn, redraw, setAccessKey, setAlign, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setCellStyle, setColSpan, setColSpan, setCriteriaField, setDataPath, setDefaultIconSrc, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDisabled, setDisplayField, setEditorType, setEditorValueFormatter, setEditorValueParser, setEmptyDisplayValue, setEmptyValueIcon, setEndRow, setErrorFormatter, setErrorIconHeight, setErrorIconSrc, setErrorIconWidth, setErrorMessageWidth, setErrorOrientation, setFetchMissingValues, setFilterLocally, setGlobalTabIndex, setHeight, setHeight, setHint, setHintStyle, setHoverAlign, setHoverDelay, setHoverHeight, setHoverOpacity, setHoverStyle, setHoverVAlign, setHoverWidth, setIconHeight, setIconPrompt, setIcons, setIconVAlign, setIconWidth, setImageURLPrefix, setImageURLSuffix, setInputTransformer, setItemHoverFormatter, setItemTitleHoverFormatter, setLeft, setName, setOperator, setOptionCriteria, setOptionDataSource, setOptionFilterContext, setOptionOperationId, setPickerIconHeight, setPickerIconSrc, setPickerIconWidth, setPrompt, setProperty, setProperty, setProperty, setProperty, setRedrawOnChange, setRejectInvalidValueOnChange, setRequired, setRowSpan, setSelectOnFocus, setShouldSaveValue, setShowDisabled, setShowErrorIcon, setShowErrorStyle, setShowErrorText, setShowFocused, setShowFocusedIcons, setShowFocusedPickerIcon, setShowHint, setShowIcons, setShowIfCondition, setShowOverIcons, setShowPickerIcon, setShowTitle, setShowValueIconOnly, setStartRow, setSuppressValueIcon, setTabIndex, setTextBoxStyle, setTimeFormatter, setTitle, setTitleAlign, setTitleOrientation, setTitleStyle, setTooltip, setTop, setType, setValidateOnChange, setValidators, setValue, setValue, setValue, setValue, setValue, setValue, setValueField, setValueFormatter, setValueIconHeight, setValueIconLeftPadding, setValueIconRightPadding, setValueIcons, setValueIconSize, setValueIconWidth, setValueMap, setValueMap, setVisible, setWidth, setWidth, setWrapTitle, show, stopHover, updateState
 
Methods inherited from class com.smartgwt.client.core.RefDataClass
getRef, getRef
 
Methods inherited from class com.smartgwt.client.core.DataClass
doAddHandler, fireEvent, getAttributeAsIntArray, getAttributeAsMap, getAttributeAsObject, getAttributeAsStringArray, getAttributes, getHandlerCount, getJsObj, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute
 
Methods inherited from class com.smartgwt.client.core.JsObject
setJsObj
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Constructor Detail

DateTimeItem

public DateTimeItem()

DateTimeItem

public DateTimeItem(JavaScriptObject jsObj)

DateTimeItem

public DateTimeItem(String name)

DateTimeItem

public DateTimeItem(String name,
                    String title)
Method Detail

getOrCreateRef

public static DateTimeItem getOrCreateRef(JavaScriptObject jsObj)

setUseTextField

public void setUseTextField(Boolean useTextField)
DateTimeItems show datetime values in a freeform text entry area.

Overrides:
setUseTextField in class DateItem
Parameters:
useTextField - useTextField Default value is true

getUseTextField

public Boolean getUseTextField()
DateTimeItems show datetime values in a freeform text entry area.

Overrides:
getUseTextField in class DateItem
Returns:
Boolean

setDisplayFormat

public void setDisplayFormat(DateDisplayFormat displayFormat)
This property can be used to customize the format in which datetimes are displayed.
Should be set to a standard DateDisplayFormat or a function which will return a formatted date time string.

If unset, the standard shortDateTime format as set up in com.smartgwt.client..Date#setShortDatetimeDisplayFormat will be used.

NOTE: you may need to update the 'inputFormat' to ensure the DateItem is able to parse user-entered date strings back into Dates

Overrides:
setDisplayFormat in class DateItem
Parameters:
displayFormat - displayFormat Default value is null

getDisplayFormat

public DateDisplayFormat getDisplayFormat()
This property can be used to customize the format in which datetimes are displayed.
Should be set to a standard DateDisplayFormat or a function which will return a formatted date time string.

If unset, the standard shortDateTime format as set up in com.smartgwt.client..Date#setShortDatetimeDisplayFormat will be used.

NOTE: you may need to update the 'inputFormat' to ensure the DateItem is able to parse user-entered date strings back into Dates

Overrides:
getDisplayFormat in class DateItem
Returns:
DateDisplayFormat

setInputFormat

public void setInputFormat(String inputFormat)
If useTextField is true this property can be used to specify the input format for date strings. If unset, the input format will be determined based on the specified displayFormat if possible (see DateItem.getInputFormat()), otherwise picked up from the Date class (see com.smartgwt.client..Date#setInputFormat).

Should be set to a standard com.smartgwt.client..DateInputFormat or a function which will take a date string as a parameter and return a Javascript Date object.

Overrides:
setInputFormat in class DateItem
Parameters:
inputFormat - inputFormat Default value is null

getInputFormat

public String getInputFormat()
If useTextField is true this property can be used to specify the input format for date strings. If unset, the input format will be determined based on the specified displayFormat if possible (see DateItem.getInputFormat()), otherwise picked up from the Date class (see com.smartgwt.client..Date#setInputFormat).

Should be set to a standard com.smartgwt.client..DateInputFormat or a function which will take a date string as a parameter and return a Javascript Date object.

Overrides:
getInputFormat in class DateItem
Returns:
String