Skip to content

Miscellaneous

timeSelect()

timeSelect() — returns any

Builds and returns a string containing three select form controls for hour, minute, and second based on the supplied objectName and property.

NameTypeRequiredDefaultDescription
objectNameanyyesSee documentation for textField.
propertystringyesSee documentation for textField.
associationstringyesSee documentation for textfield.
positionstringyesSee documentation for textfield.
orderstringyeshour,minute,secondUse to change the order of or exclude time select tags.
separatorstringyes:Use to change the character that is displayed between the time select tags.
minuteStepnumericyes1Pass in 10 to only show minute 10, 20, 30, etc.
secondStepnumericyes1Pass in 10 to only show seconds 10, 20, 30, etc.
includeBlankanyyesfalseSee documentation for select.
labelstringyesfalseSee documentation for dateSelect.
labelPlacementstringyesaroundSee documentation for textField.
prependstringyesSee documentation for textField.
appendstringyesSee documentation for textField.
prependToLabelstringyesSee documentation for textField.
appendToLabelstringyesSee documentation for textField.
errorElementstringyesspanSee documentation for textField.
errorClassstringyesfieldWithErrorsSee documentation for textField.
combinebooleanyesSee documentation for dateSelect.
twelveHourbooleanyesfalsewhether to display the hours in 24 or 12 hour format. 12 hour format has AM/PM drop downs
<!--- View code --->
<cfoutput>
    #timeSelect(objectName="business", property="openUntil")#
</cfoutput>

<!--- Show fields for hour and minute --->
<cfoutput>
	#timeSelect(objectName="business", property="openUntil", order="hour,minute")#
</cfoutput>

<!--- Only show 15-minute intervals --->
<cfoutput>
	#timeSelect(objectName="appointment", property="dateTimeStart", minuteStep=15)#
</cfoutput>