For Adobe ColdFusion application servers DatePicker

DatePicker is a composite field comprising several HTML fields strung together to collect one piece of information. DatePicker is used to collect a date. It is similar to the calendar format, but ensures users from different parts of the world do not confuse months and days.

The individual select boxes are ordered according to the page's locale. The default datatype for DatePicker is date. Use min and max to control the range of dates that may be selected. For example:

min="#createDate(1980,1,1)#"
max="#now()#"

The following special attributes are available for DatePicker:

  • dayPrompt, monthPrompt, yearPrompt
    Optional. Prompt for each column of numbers. Default to "D", "M", and "Y" respectively.
  • dayMask, monthMask, yearMask
    Optional. Mask as used with lsDateFormat() to render the values for day, month, and year. Default to "d", "mmmm", and "yyyy" respectively.

Other non-TerraField attributes will be passed through to the underlying select box tags (<select>).

When this composite field is submitted with valid data, several fields will become available. They are (where [name] represents the name of the field):

  • [name]
    The full date chosen - an internationalised ODBC date/time object.
  • [name]_day
    The day component.
  • [name]_month
    The month component.
  • [name]_year
    The year component.

Examples

A DatePicker field:

<cf_terrafield
  name="date"
  required="yes"
  format="datepicker"
/>
 *

Fields marked with  * are required.

Open Database Connectivity
A Microsoft standard for accessing different database systems from Windows.
HyperText Markup Language
The coding language used to create hypertext documents for use on the World Wide Web.
No comments yet