本文整理汇总了PHP中dosamigos\datepicker\DatePicker::Widget方法的典型用法代码示例。如果您正苦于以下问题:PHP DatePicker::Widget方法的具体用法?PHP DatePicker::Widget怎么用?PHP DatePicker::Widget使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dosamigos\datepicker\DatePicker
的用法示例。
在下文中一共展示了DatePicker::Widget方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: function
/* @var $searchModel app\module\handbook\models\ClassroomsBusySearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Забронювати аудиторію';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="classrooms-busy-index">
<h1><?php
echo Html::encode($this->title);
?>
</h1>
<?php
// echo $this->render('_search', ['model' => $searchModel]);
?>
<p>
<?php
echo Html::a('Забронювати аудиторію', ['create'], ['class' => 'btn btn-success']);
?>
</p>
<?php
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['label' => 'Аудиторія', 'attribute' => 'id_classroom', 'value' => function ($data) {
$classes = ClassRooms::findOne(['classrooms_id' => $data->id_classroom]);
$housing = Housing::findOne(['housing_id' => $classes['id_housing']]);
return $classes['classrooms_number'] . ' - ' . $housing['name'];
}], ['attribute' => 'lesson', 'value' => 'lesson0.lesson_time_name'], ['attribute' => 'day', 'value' => 'day', 'filter' => DatePicker::Widget(['model' => $searchModel, 'attribute' => 'day', 'inline' => false, 'language' => 'ua', 'clientOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd', 'class' => 'ijjijj']])], ['class' => 'yii\\grid\\ActionColumn']]]);
?>
</div>