html_select_dateAttribute NameTypeRequiredDefaultDescriptionprefixstringNoDate_what to prefix the var name withtimetimestamp/YYYY-MM-DDNocurrent time in unix timestamp or YYYY-MM-DD
formatwhat date/time to usestart_yearstringNocurrent yearthe first year in the dropdown, either
year number, or relative to current year (+/- N)end_yearstringNosame as start_yearthe last year in the dropdown, either
year number, or relative to current year (+/- N)display_daysbooleanNotruewhether to display days or notdisplay_monthsbooleanNotruewhether to display months or notdisplay_yearsbooleanNotruewhether to display years or notmonth_formatstringNo%Bwhat format the month should be in (strftime)day_formatstringNo%02dwhat format the day output should be in (sprintf)day_value_formatstringNo%dwhat format the day value should be in (sprintf)year_as_textbooleanNofalsewhether or not to display the year as textreverse_yearsbooleanNofalsedisplay years in reverse orderfield_arraystringNonull
if a name is given, the select boxes will be drawn
such that the results will be returned to PHP in the
form of name[Day], name[Year], name[Month].
day_sizestringNonulladds size attribute to select tag if givenmonth_sizestringNonulladds size attribute to select tag if givenyear_sizestringNonulladds size attribute to select tag if givenall_extrastringNonulladds extra attributes to all select/input tags if
givenday_extrastringNonulladds extra attributes to select/input tags if
givenmonth_extrastringNonulladds extra attributes to select/input tags if
givenyear_extrastringNonulladds extra attributes to select/input tags if
givenfield_orderstringNoMDYthe order in which to display the fieldsfield_separatorstringNo\nstring printed between different fieldsmonth_value_formatstringNo%mstrftime format of the month values, default is
%m for month numbers.year_emptystringNonullIf supplied then the first element of the year's select-box has this
value as it's label and "" as it's value. This is useful to make the
select-box read "Please select a year" for example.
Note that you can use values like "-MM-DD" as time-attribute to indicate
an unselected year.month_emptystringNonullIf supplied then the first element of the month's select-box has this
value as it's label and "" as it's value. .
Note that you can use values like "YYYY--DD" as time-attribute to indicate
an unselected month.day_emptystringNonullIf supplied then the first element of the day's select-box has this
value as it's label and "" as it's value.
Note that you can use values like "YYYY-MM-" as time-attribute to indicate
an unselected day.
html_select_date is a custom function that creates date dropdowns
for you. It can display any or all of year, month, and day.
html_select_date
This will output:
]]>
html_select_date
This will output: (current year is 2000)
]]>