Answer the question
In order to leave comments, you need to log in
How to get data from DateRangePicker?
Good afternoon! Tell me how to get data from DateRangePicker? Now the form and the Submit button are used. I want to use the widget's Apply button for this purpose. My code:
<?php
$form = ActiveForm::begin([
'id' => 'prosto-form',
'options' => ['class' => 'form-inline','style'=>'border:1px;'],
]);
echo '<div class="input-group">';
echo DateRangePicker::widget([
'name'=>'model',
'model' => $model,
'attribute' => 'kvdate1',
'useWithAddon'=>true,
'convertFormat'=>true,
'pluginOptions'=>[
'locale'=>['format' => 'Y-m-d'],
],
]);
echo '</div>';
echo '<div>';
echo Html::submitButton('Данные за период', ['class' => 'btn btn-primary', 'align'=>'center ']);
echo '</div>';
ActiveForm::end()
?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question