Hello everyone, can someone tell
me how to use “use kartik\daterange\DateRangePicker;”
the page is small. When the DateRangePicker appears when clicking on the field, a scroll bar appears (logically). So only in this case, every time you click on any element of the calendar, the page moves up sharply. Maybe someone knows how to solve the problem?
Here is the code:
$datePickerWidget = [
‘useWithAddon’ => true,
‘presetDropdown’ => true,
‘convertFormat’ => true,
‘pluginOptions’ => [
‘timePicker’ => true,
‘timePicker24Hour’ => true,
‘timePickerIncrement’ => 5,
‘locale’ => [‘format’ => ‘Y.m.d H:i’],
‘singleDatePicker’ => true,
‘showDropdowns’ => true,
‘opens’ => ‘right’
],
‘options’ => [‘placeholder’ => Yii::t(‘app’, ‘Select datetime…’)],
];
<?= $form->field($formModel, 'opened_at')->widget(DateRangePicker::class, $datePickerWidget) ?>
<?= Html::submitButton(Yii::t('app', 'Save'), ['class' => 'btn btn-success']) ?>
<?php ActiveForm::end(); ?>