TimeSpanPicker
TimeSpanPicker is a composite field comprising several HTML fields that work together to collect a timespan or length of time, i.e. a number of days, hours, minutes, and seconds. The timeSpanPicker format is not intended to represent a time of day. The values are combined into the base unit, which defaults to days. For example, if a user specifies 6 hours, then the resulting value is 0.25, representing one quarter of a day. If the base unit is hours, then the resulting value will be 6.
The default datatype for TimeSpanPicker is real.
The following special attributes are available for TimeSpanPicker:
-
baseUnit
Optional. The units of time span used for the input and output values. Possible values are: "d", "h", "n", "s" representing days, hours minutes, seconds respectively. Defaults to days ("d"). Note the symbol for minutes is "n", corresponding to the symbol used in the ColdFusion dateFormat() function. -
days, hours, minutes, seconds
Optional. Toggle the display of each selector column? True or false. Defaults to false, true, true, false respectively. -
daysMax, hoursMax, minutesMax, secondsMax
Optional. The maximum number of each unit to allow. Defaults to 99, 99, 59, 59 respectively. -
daysPrompt, hoursPrompt, minutesPrompt, secondsPrompt
Optional. Prompt for each column of numbers. Defaults to "D", "H", "M", and "S" 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. Depending on the format of the picker, these may not all become available (e.g. [name]_seconds won't be available if the seconds attribute is set to false). They are (where [name] represents the name of the field):
-
[name]
The full timespan chosen - a real number. -
[name]_days
The days component chosen. -
[name]_hours
The hours component chosen. -
[name]_minutes
The minutes component. -
[name]_seconds
The seconds component.
