/** * Should we show the date in a text field, or as 3 select boxes? * * * @return Boolean * @see com.smartgwt.client.docs.Basics Basics overview and related methods * @see <a href="http://www.smartclient.com/smartgwt/showcase/#grid_datatypes_date" target="examples">Date Example</a> */ public Boolean getUseTextField() { return getAttributeAsBoolean("useTextField"); }
/** * When set to true (the default), use a single shared date-picker across all widgets that use one. When false, create a * new picker using the autoChild system. See {@link com.smartgwt.client.widgets.form.fields.DateItem#getPickerDefaults * picker} and {@link com.smartgwt.client.widgets.form.fields.DateItem#getPickerProperties pickerProperties} for details * on setting up an unshared picker. * * * @return Boolean */ public Boolean getUseSharedPicker() { return getAttributeAsBoolean("useSharedPicker"); }
/** * Can this field be set to a non-date value [other than null]?
 <P>
 When set to true, {@link * com.smartgwt.client.widgets.form.fields.FormItem#setValue FormItem.setValue} will return false without setting the item * value
 and log a warning if passed something other than a valid date value.
 If the dateItem is showing a {@link * com.smartgwt.client.widgets.form.fields.DateItem#getUseTextField free-form text entry field},
 and a user enters a * text value which cannot be parsed into a valid date, the item will
 automatically redraw and display the {@link * com.smartgwt.client.widgets.form.fields.DateItem#getInvalidDateStringMessage invalidDateStringMessage} (though at * this
 point calling {@link com.smartgwt.client.widgets.form.fields.FormItem#getValue FormItem.getValue} will return * the string entered by the user).
 <P>
 When set to false, a user may enter value that is not a valid date (for * example, "Not
 applicable") and the value will not immediately be flagged as an error. However note
 that for * the value to actually pass validation you would need to declare the field as
 not of "date" type, for example:
 * <pre>
 {name:"startDate", type:"dateOrOther", editorType:"DateItem", useTextField:true },
 </pre>
 The * type "dateOrOther" could be declared as a {@link com.smartgwt.client.data.SimpleType}, with validators that
 will * accept either a valid date or certain special Strings (like "Not Available").
 <P>
 Only applies to dateItems * where {@link com.smartgwt.client.widgets.form.fields.DateItem#getUseTextField useTextField} is true. Non-Date * values
 are never supported in items where useTextField is false. * * * @return Boolean */ public Boolean getEnforceDate() { return getAttributeAsBoolean("enforceDate"); }