?
This document uses PHP Chinese website manual Release
Attribute Name | Type | Required | Default | Description |
---|---|---|---|---|
prefix | string | No | Date_ | what to prefix the var name with |
time | timestamp/YYYY-MM-DD | No | current time in unix timestamp or YYYY-MM-DD format | what date/time to use |
start_year | string | No | current year | the first year in the dropdown, either year number, or relative to current year (+/- N) |
end_year | string | No | same as start_year | the last year in the dropdown, either year number, or relative to current year (+/- N) |
display_days | boolean | No | true | whether to display days or not |
display_months | boolean | No | true | whether to display months or not |
display_years | boolean | No | true | whether to display years or not |
month_format | string | No | %B | what format the month should be in (strftime) |
day_format | string | No | %02d | what format the day output should be in (sprintf) |
day_value_format | string | No | %d | what format the day value should be in (sprintf) |
year_as_text | boolean | No | false | whether or not to display the year as text |
reverse_years | boolean | No | false | display years in reverse order |
field_array | string | No | null | 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_size | string | No | null | adds size attribute to select tag if given |
month_size | string | No | null | adds size attribute to select tag if given |
year_size | string | No | null | adds size attribute to select tag if given |
all_extra | string | No | null | adds extra attributes to all select/input tags if given |
day_extra | string | No | null | adds extra attributes to select/input tags if given |
month_extra | string | No | null | adds extra attributes to select/input tags if given |
year_extra | string | No | null | adds extra attributes to select/input tags if given |
field_order | string | No | MDY | the order in which to display the fields |
field_separator | string | No | \n | string printed between different fields |
month_value_format | string | No | %m | strftime format of the month values, default is %m for month numbers. |
屬性 | 類型 | 是否必須 | 缺省值 | 描述 |
---|---|---|---|---|
prefix | string | No | Date_ | 變量名稱前綴 |
time | timestamp/YYYY-MM-DD | No | UNIX時(shí)間戳或年-月-日 | 使用時(shí)間類型(data/time) |
start_year | string | No | 年份或與當(dāng)前年份的相對值 | 下拉列表中第一個(gè)年份,或與當(dāng)前年份的相對值(正/負(fù) 幾年) |
end_year | string | No | 同start_year | 下拉列表中最后一個(gè)年份,或與當(dāng)前年份的相對值(正/負(fù) 幾年) |
display_days | boolean | No | true | 是否顯示天 |
display_months | boolean | No | true | 是否顯示月 |
display_years | boolean | No | true | 是否顯示年 |
month_format | string | No | %B | 月份的表示方法(strftime) |
day_format | string | No | %02d | 天顯示的格式(sprintf) |
day_value_format | string | No | %d | 天的表示方法(sprintf) |
year_as_text | boolean | No | false | 是否以文本方式顯示年份 |
reverse_years | boolean | No | false | 逆序顯示年份 |
field_array | string | No | null | 如果指定了名稱,選定的區(qū)域?qū)⒁訹Day],[Year],[Month]的形式返回給PHP(待考) |
day_size | string | No | null | 如果給定,為標(biāo)簽添加大小屬性 |
month_size | string | No | null | 如果給定,為標(biāo)簽添加大小屬性 |
year_size | string | No | null | 如果給定,為標(biāo)簽添加大小屬性 |
all_extra | string | No | null | 如果給定,為所有標(biāo)簽添加附加屬性 |
day_extra | string | No | null | 如果給定,為標(biāo)簽添加附加屬性 |
month_extra | string | No | null | 如果給定,為標(biāo)簽添加附加屬性 |
year_extra | string | No | null | 如果給定,為標(biāo)簽添加附加屬性 |
field_order | string | No | MDY | 顯示區(qū)域的順序 |
field_separator | string | No | \n | 各區(qū)域間輸出的分隔字符串 |
month_value_format | string | No | %m | 月份值的strftime表示方法,默認(rèn)為 %m |
html_select_date is a custom function that creates date dropdowns for you. It can display any or all of year, month, and day.
自定義函數(shù) html_select_date 用于創(chuàng)建日期下拉菜單. 它可以顯示任意年月日.
Example 8-10. html_select_date
|
Example 8-11. html_select_date
|