/** * Default date to show in the date chooser. If this items value is currently unset, this property may be specified to set * a default date to highlight in the dateChooser for this item. If unset, the date chooser will highlight the current * date by default. Note that this has no effect if the item as a whole currently has a value - in that case the date * chooser will always highlight the current value for the item. * * @param defaultChooserDate defaultChooserDate Default value is null */ public void setDefaultChooserDate(java.util.Date defaultChooserDate) { setAttribute("defaultChooserDate", defaultChooserDate); }
/** * Maximum date the selectors will allow the user to pick. <P> See {@link * com.smartgwt.client.widgets.form.fields.DateItem#getStartDate startDate} for details on how this restriction works. * * @param endDate endDate Default value is 12/31/2015 * @see com.smartgwt.client.docs.Appearance Appearance overview and related methods */ public void setEndDate(java.util.Date endDate) { setAttribute("endDate", endDate); }
/** * Only used if we're showing the date in a text field. When parsing a date, if the year is specified with only 2 digits * and is less than the centuryThreshold, then the year will be assumed to be 20xx; otherwise it will be interpreted * according to default browser behaviour, which will consider it to be 19xx. * * @param centuryThreshold centuryThreshold Default value is 25 * @see com.smartgwt.client.docs.Appearance Appearance overview and related methods */ public void setCenturyThreshold(int centuryThreshold) { setAttribute("centuryThreshold", centuryThreshold); }
/** * If {@link com.smartgwt.client.widgets.form.fields.DateItem#getUseTextField useTextField} and {@link * com.smartgwt.client.widgets.form.fields.DateItem#getUseMask useMask} are both <code>true</code> this value is the * separator between date components. * <p><b>Note : </b> This is an advanced setting</p> * * @param maskDateSeparator maskDateSeparator Default value is "/" * @see com.smartgwt.client.docs.Basics Basics overview and related methods */ public void setMaskDateSeparator(String maskDateSeparator) { setAttribute("maskDateSeparator", maskDateSeparator); }
/** * Prompt to show when the user hovers the mouse over the picker icon for this DateItem. May be overridden for localization * of your application. * * @param pickerIconPrompt pickerIconPrompt Default value is "Show Date Chooser" */ public void setPickerIconPrompt(String pickerIconPrompt) { setAttribute("pickerIconPrompt", pickerIconPrompt); }
/** * 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. * * @param useSharedPicker useSharedPicker Default value is true */ public void setUseSharedPicker(Boolean useSharedPicker) { setAttribute("useSharedPicker", useSharedPicker); }
/** * Should we show the date in a text field, or as 3 select boxes? * * @param useTextField useTextField Default value is null * @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 void setUseTextField(Boolean useTextField) { setAttribute("useTextField", useTextField); }
/** * Validation error message to display if the user enters an invalid date * * @param invalidDateStringMessage invalidDateStringMessage Default value is "Invalid date" */ public void setInvalidDateStringMessage(String invalidDateStringMessage) { setAttribute("invalidDateStringMessage", invalidDateStringMessage); }
public DateItem(){ setAttribute("editorType", "DateItem"); }
/** * If {@link com.smartgwt.client.widgets.form.fields.DateItem#getUseTextField useTextField} is <code>true</code> 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 {@link com.smartgwt.client.widgets.form.fields.DateItem#getDisplayFormat displayFormat} if possible * (see {@link com.smartgwt.client.widgets.form.fields.DateItem#getInputFormat DateItem.getInputFormat}), otherwise picked * up from the Date class (see Date.setInputFormat). <P> Should be set to a standard String or a function which will take * a date string as a parameter and return a Javascript Date object. * * @param inputFormat inputFormat Default value is null * @see com.smartgwt.client.widgets.form.fields.DateItem#setDisplayFormat */ public void setInputFormat(String inputFormat) { setAttribute("inputFormat", inputFormat); }
/** * If <code>dateFormatter</code> is set at init time, it will be used instead of {@link * com.smartgwt.client.widgets.form.fields.DateItem#getDisplayFormat displayFormat} to govern how dates are displayed in * this item. * <p><b>Note : </b> This is an advanced setting</p> * * @param dateFormatter dateFormatter Default value is null */ public void setDateFormatter(DateDisplayFormat dateFormatter) { setAttribute("dateFormatter", dateFormatter.getValue()); }
/** * If {@link com.smartgwt.client.widgets.form.fields.DateItem#getUseTextField useTextField} is <code>true</code> this * property governs the alignment of text within the text field. * * @param textAlign textAlign Default value is Canvas.RIGHT * @see com.smartgwt.client.docs.Appearance Appearance overview and related methods */ public void setTextAlign(Alignment textAlign) { setAttribute("textAlign", textAlign.getValue()); }
/** * Custom properties to apply to this dateItem's generated {@link * com.smartgwt.client.widgets.form.fields.DateItem#getMonthSelector monthSelector}. * <p><b>Note : </b> This is an advanced setting</p> * * @param monthSelectorProperties monthSelectorProperties Default value is null */ public void setMonthSelectorProperties(SelectItem monthSelectorProperties) { setAttribute("monthSelectorProperties", monthSelectorProperties.getJsObj()); }
/** * Custom properties to apply to this dateItem's generated {@link * com.smartgwt.client.widgets.form.fields.DateItem#getTextField textField}. Only applies if {@link * com.smartgwt.client.widgets.form.fields.DateItem#getUseTextField useTextField} is true. * <p><b>Note : </b> This is an advanced setting</p> * * @param textFieldProperties textFieldProperties Default value is null */ public void setTextFieldProperties(TextItem textFieldProperties) { setAttribute("textFieldProperties", textFieldProperties.getJsObj()); }
/** * Custom properties to apply to this dateItem's generated {@link * com.smartgwt.client.widgets.form.fields.DateItem#getDaySelector daySelector}. * <p><b>Note : </b> This is an advanced setting</p> * * @param daySelectorProperties daySelectorProperties Default value is null */ public void setDaySelectorProperties(SelectItem daySelectorProperties) { setAttribute("daySelectorProperties", daySelectorProperties.getJsObj()); }
/** * Custom properties to apply to this dateItem's generated {@link * com.smartgwt.client.widgets.form.fields.DateItem#getYearSelector yearSelector}. * <p><b>Note : </b> This is an advanced setting</p> * * @param yearSelectorProperties yearSelectorProperties Default value is null */ public void setYearSelectorProperties(SelectItem yearSelectorProperties) { setAttribute("yearSelectorProperties", yearSelectorProperties.getJsObj()); }
public DateItem(String name) { setName(name); setAttribute("editorType", "DateItem"); }
/** * If showing date selectors rather than the date text field (so when <code>this.useTextField</code> is false), this * property allows customization of the order of the day, month and year selector fields. If unset these fields will * match the specified inputFormat for this item. <P> Note: selectors may be ommitted entirely by setting selectorFormat to * (for example) <code>"MD"</code>. In this case the value for the omitted selector will match the {@link * com.smartgwt.client.widgets.form.fields.DateItem#getDefaultValue defaultValue} specified for the item. For example, if * the selector format is "MD" (month and day only), the year comes from the Date specified as the defaultValue. * * @param selectorFormat selectorFormat Default value is null */ public void setSelectorFormat(DateItemSelectorFormat selectorFormat) { setAttribute("selectorFormat", selectorFormat.getValue()); }
/** * If {@link com.smartgwt.client.widgets.form.fields.DateItem#getUseTextField useTextField} is <code>true</code> this * property can be used to customize the format in which dates are displayed.<br> Should be set to a standard {@link * com.smartgwt.client.types.DateDisplayFormat} or a function which will return a formatted date string. <P> If unset, the * standard shortDate format as set up via Date.setShortDisplayFormat will be used. <P> <B>NOTE: you may need to update * the {@link com.smartgwt.client.widgets.form.fields.DateItem#getInputFormat inputFormat} to ensure the DateItem is able * to parse user-entered date strings back into Dates</B> * * @param displayFormat displayFormat Default value is null * @see com.smartgwt.client.widgets.form.fields.DateItem#setInputFormat */ public void setDisplayFormat(DateDisplayFormat displayFormat) { setAttribute("displayFormat", displayFormat.getValue()); }
public DateItem(String name, String title) { setName(name); setTitle(title); setAttribute("editorType", "DateItem"); }