DateFormHelper
日付や時刻のフォームエレメントを取り扱うヘルパー。
本家のAPIはこちら(なぜかAPIのコードサンプルで、いくつかselect_ではなくsubmit_になってるのが気になる)
(string) select_datetime_tag ($name, $value = null, $options = array(), $html_options = array())
日付、時刻をセレクトするタグを生成する。
$optionsで使用するオプション:
include_blank - 先頭行にブランクを表示するかどうか
include_custom - 先頭行にカスタムテキストを表示
include_second - trueがセットされていたら、秒をセレクトに表示
discard_month - trueがセットされていた場合、年と日のみ表示される
discard_day - trueがセットされていた場合、年月のみ表示される
discard_year - trueがセットされていた場合、月日のみ表示される
use_month_numbers - 月が1-12の数字で表示される
use_short_month - Jan, Febなどの略字で月が表示される
year_start - 選択可能な最初の年をセット
year_end - 選択可能な最後の年をセット
second_step - 秒の間隔
minute_step - 分の間隔
12hour_time - trueがセットされていた場合、選択可能な時間が1-12までになる (初期値は0-23)
date_seperator - 年月日の区切り文字
time_seperator - 時間の区切り文字
ampm_seperator - 午前午後の区切り文字
Examples:
echo select_datetime_tag('datetime');echo select_datetime_tag('datetime', '1979-10-30');$datetime = array('year' => '1979', 'month' => 10, 'day' => 30, 'hour' => '15', 'minute' => 46);
echo select_datetime_tag('time', $datetime, array('use_short_month' => true, '12hour_time' => true));(string) select_date_tag ($name, $value = null, $options = array(), $html_options = array())
日付セレクトタグ。
$optionsで使用するオプション:
include_blank - select_datetime_tagを参照
include_custom - select_datetime_tagを参照
discard_month - select_datetime_tagを参照
discard_day - select_datetime_tagを参照
discard_year - select_datetime_tagを参照
use_month_numbers - select_datetime_tagを参照
use_short_month - select_datetime_tagを参照
year_start - select_datetime_tagを参照
year_end - select_datetime_tagを参照
date_seperator - select_datetime_tagを参照
(string) select_year_tag ($name, $value = null, $options = array(), $html_options = array())
$optionsで使用するオプション:
include_blank - select_datetime_tagを参照
include_custom - select_datetime_tagを参照
year_start - select_datetime_tagを参照
year_end - select_datetime_tagを参照
(string) select_month_tag ($name, $value = null, $options = array(), $html_options = array())
$optionsで使用するオプション:
include_blank - select_datetime_tagを参照
include_custom - select_datetime_tagを参照
use_month_numbers - select_datetime_tagを参照
use_short_month - select_datetime_tagを参照
(string) select_day_tag ($name, $value = null, $options = array(), $html_options = array())
日付のセレクトタグ。
$optionsで使用するオプション:
include_blank - select_datetime_tagを参照
include_custom - select_datetime_tagを参照
(string) select_time_tag ($name, $value = null, $options = array(), $html_options = array())
$optionsで使用するオプション:
include_blank - select_datetime_tagを参照
include_custom - select_datetime_tagを参照
include_second - select_datetime_tagを参照
second_step - select_datetime_tagを参照
minute_step - select_datetime_tagを参照
12hour_time - select_datetime_tagを参照
time_seperator - select_datetime_tagを参照
ampm_seperator - select_datetime_tagを参照
(string) select_hour_tag ($name, $value = null, $options = array(), $html_options = array())
$optionsで使用するオプション:
include_blank - select_datetime_tagを参照
include_custom - select_datetime_tagを参照
12hour_time - select_datetime_tagを参照
(string) select_minute_tag ($name, $value = null, $options = array(), $html_options = array())
$optionsで使用するオプション:
include_blank - select_datetime_tagを参照
include_custom - select_datetime_tagを参照
minute_step - select_datetime_tagを参照
(string) select_second_tag ($name, $value = null, $options = array(), $html_options = array())
$optionsで使用するオプション:
include_blank - select_datetime_tagを参照
include_custom - select_datetime_tagを参照
second_step - select_datetime_tagを参照
トラックバックを送りたい場合は、下のURLの尻に、/tra/prease と付け足してください。