I
I
Igor Braduloff2018-09-06 16:17:17
Yii
Igor Braduloff, 2018-09-06 16:17:17

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 question

Ask a Question

731 491 924 answers to any question