0

Problem

I set orientation, but it's still at the bottom. What's the problem?

Code

<?=$form->field($contactUsModel, 'planningToTravelFrom')
                            ->widget(\dosamigos\datepicker\DateRangePicker::className(), [
                                'attributeTo'   => 'planningToTravelTo',
                                'form'          => $form, // best for correct client validation
                                'language'      => 'es',
                                'size'          => 'lg',
                                'clientOptions' => [
                                    'autoclose'   => true,
                                    'orientation' => 'top',
                                    'format'      => 'dd-M-yyyy'
                                ]
                            ]);?>

enter image description here

D.R.
  • 2,540
  • 3
  • 24
  • 49

1 Answers1

0

Problem was in

  1. Should be 'orientation' => 'bottom'
  2. Not works with date-range-picker bugfix

 

$("#contactform-planningtotravelfrom, #contactform-planningtotravelto").datepicker().on('show.bs.modal', function (event) {
        // prevent datepicker from firing bootstrap modal "show.bs.modal"
        event.stopPropagation();
    });
D.R.
  • 2,540
  • 3
  • 24
  • 49