เลือกช่วงวันที่ โดยมีรูปแบบ คือ 'yyyy-mm-dd HH:ii:s',
<div class="form-date">
<?php $form = ActiveForm::begin(); ?>
<div class="panel panel-heading col-sm-4 col-md-4">
<?= DateTimePicker::widget([
'name'=>'date1',
'attribute'=>'date1',
'language' => 'th',
'options' => ['placeholder' => 'เลือกวันที่เริ่ม'],
'pluginOptions' => [
'autoclose' => true,
'timePicker'=> true,
'format' => 'yyyy-mm-dd HH:ii:s',
'todayHighlight' => true
]
]);?>
</div>
<div class="panel panel-heading col-sm-4 col-md-4">
<?= DateTimePicker::widget([
'name'=>'date2',
'attribute'=>'date2',
'language' => 'th',
'options' => ['placeholder' => 'เลือกวันที่สิ้นสุด'],
'pluginOptions' => [
'autoclose' => true,
'timePicker'=> true,
'format' => 'yyyy-mm-dd HH:ii:s',
'todayHighlight' => true
]
]);?>
</div>
<div class="form-group panel panel-heading col-sm-4 col-md-4">
<?= Html::submitButton('ค้นหา', ['class'=> 'btn btn-primary']); ?>
</div>
<?php ActiveForm::end(); ?>
</div>
<div class="form-date">
<?php $form = ActiveForm::begin(); ?>
<div class="panel panel-heading col-sm-4 col-md-4">
<?= DateTimePicker::widget([
'name'=>'date1',
'attribute'=>'date1',
'language' => 'th',
'options' => ['placeholder' => 'เลือกวันที่เริ่ม'],
'pluginOptions' => [
'autoclose' => true,
'timePicker'=> true,
'format' => 'yyyy-mm-dd HH:ii:s',
'todayHighlight' => true
]
]);?>
</div>
<div class="panel panel-heading col-sm-4 col-md-4">
<?= DateTimePicker::widget([
'name'=>'date2',
'attribute'=>'date2',
'language' => 'th',
'options' => ['placeholder' => 'เลือกวันที่สิ้นสุด'],
'pluginOptions' => [
'autoclose' => true,
'timePicker'=> true,
'format' => 'yyyy-mm-dd HH:ii:s',
'todayHighlight' => true
]
]);?>
</div>
<div class="form-group panel panel-heading col-sm-4 col-md-4">
<?= Html::submitButton('ค้นหา', ['class'=> 'btn btn-primary']); ?>
</div>
<?php ActiveForm::end(); ?>
</div>