0

问题

我设置了方向,但它仍然在底部。有什么问题?

代码

<?=$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'
                                ]
                            ]);?>

在此处输入图像描述

4

1 回答 1

0

问题出在

  1. 应该'orientation' => 'bottom'
  2. 不适用于日期范围选择器错误修复

 

$("#contactform-planningtotravelfrom, #contactform-planningtotravelto").datepicker().on('show.bs.modal', function (event) {
        // prevent datepicker from firing bootstrap modal "show.bs.modal"
        event.stopPropagation();
    });
于 2016-10-17T12:48:33.420 回答