Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
OrganizationAdvent CalendarQiitadon (β)
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What is going on with this article?


More than 5 years have passed since last update.



// 日本語対応(YYYY年MM月DD日 HH時mm分)
    'dateWidget' => '<ul class="list-inline"><li class="year">{{year}} 年</li><li class="month"> {{month}} 月 </li><li class="day"> {{day}} 日 </li><li class="hour"> {{hour}} 時 </li><li class="minute"> {{minute}} 分 </li></ul>'

echo $this->Form->input('start_datetime', array(
                                     'type' => 'datetime',
                                     'label' => '開始日時',
                                     'dateFormat' => 'YMD',
                                     'monthNames' => false,
                                     'separator' => '/',
                                     'minYear' => date('Y'),
                                     'maxYear' => date('Y')+1,
                                     'default' => date('Y-m-d')

Creating DateTime Inputs

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away