yii2 DateTimePicker显示到天

 

扩展是
kartik\datetime\DateTimePicker;
关键是加入此配置  'minView'=> "month",示例如下:
 <?php
        echo DateTimePicker::widget([
            'name' => 'dayEnd',
            'value' => $request['dayEnd'] ? $request['dayEnd'] : "",
            'options' => ['placeholder' => '截止日期','autocomplete'=>'off'],
            'pluginOptions' => [
                'autoclose' => true,
                'format' => 'yyyy-mm-dd',
                'todatHightlight'=>true,
          //关键配置 'minView'=> "month", ], ]); ?>

 

posted @ 2019-04-28 16:31  山上小和尚  阅读(552)  评论(0编辑  收藏  举报