<?php /** @noinspection PhpUnhandledExceptionInspection */

use common\modules\event\models\timetable\TimeTableSearch;
use kartik\widgets\DatePicker;
use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model TimeTableSearch */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="event-search">
    <?php $form = ActiveForm::begin([
        'action' => ['timetable'],
        'method' => 'get',
    ]); ?>
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">Keresés</h3>
        </div>
        <div class="panel-body">
            <div class="row">
                <div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
                    <?= $form->field($model, 'startDateString')->widget(DatePicker::class, [
                        'pluginOptions' => [
                            'autoclose' => true,
                            'format' => 'yyyy.mm.dd',
                            'calendarWeeks'=> true
                        ],
                        'options' => [
                            'autocomplete' => 'off'
                        ]
                    ]) ?>
                </div>
            </div>
        </div>
        <div class="panel-footer">
            <?= Html::submitButton(Yii::t('event', 'Search'), ['class' => 'btn btn-primary']) ?>
        </div>
    </div>
    <?php ActiveForm::end(); ?>
</div>
