2amigos / yii2-date-picker-widget

Bootstrap DatePicker Widget for Yii2
https://2amigos.us
Other
130 stars 77 forks source link

Calendar does not pop up #41

Open brian2453 opened 7 years ago

brian2453 commented 7 years ago

When I click on the form field nothing happens. I can see the changes to the field, but doesn't work. Not sure if I missed something but I followed the installation without any issues.

<?php

use yii\helpers\Html; use yii\helpers\ArrayHelper; use yii\widgets\ActiveForm; use backend\models\ClassTitles; use dosamigos\datepicker\DatePicker;

/ @var $this yii\web\View / / @var $model backend\models\Classes / / @var $form yii\widgets\ActiveForm / ?>

field($model, 'class_name')->dropDownList( ArrayHelper::map(ClassTitles::find()->all(), 'class_name','class_name'), ['prompt'=>'Select a Class'])?> field($model, 'price')->textInput() ?> field($model, 'weeks')->textInput() ?> field($model, 'starting_date')->widget( DatePicker::className(), [ // inline too, not bad 'inline' => true, // modify template for custom rendering 'template' => '
{input}
', 'clientOptions' => [ 'autoclose' => true, 'format' => 'dd-M-yyyy' ] ]);?> field($model, 'ending_date')->textInput() ?> field($model, 'time')->textInput() ?> field($model, 'duration')->textInput() ?> field($model, 'scheduled_on')->textInput() ?>
isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
tonydspaniard commented 7 years ago

Thats the inline version, it should render not popup.

zakayothuku commented 7 years ago

I am experiencing the same issue: the calendar not popping up when i focus on the input field. What could be the problem?

field($model, 'event_name')->textInput(['maxlength' => true]) ?> field($model, 'event_venue')->textInput(['maxlength' => true]) ?> field($model, 'event_start_date')->widget( DatePicker::className(), [ // inline too, not bad 'inline' => false, 'clientOptions' => [ 'autoclose' => false, 'format' => 'yyyy-mm-dd' ] ]); ?> field($model, 'event_end_date')->widget( DatePicker::className(), [ // inline too, not bad 'inline' => false, 'clientOptions' => [ 'autoclose' => false, 'format' => 'yyyy-mm-dd' ] ]); ?>
isNewRecord ? Yii::t('app', 'Create Event') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
tonydspaniard commented 7 years ago

@BillionaireZ @brian2453 have you checked the developer tools if there is any javascript error? what about the css file? is it rendered?

Riastefania15 commented 6 years ago

I am experiencing the same issue: the calendar not popping up <?php use dosamigos\datepicker\DatePicker; use yii\jui\AutoComplete;

field($model, 'Id_rekap')->textInput(['maxlength' => true]) ?> field($model, 'tanggal')->widget( DatePicker::className(), [ // inline too, not bad 'inline' => false, // modify template for custom rendering //'template' => '
{input}
', 'clientOptions' => [ 'autoclose' => true, 'format' => 'dd-M-yyyy' ] ]);?> ?>
push32 commented 6 years ago
    <?= $form->field($model, 'event_start_date')->widget(
        DatePicker::className(), [
            // inline too, not bad
            'inline' => false,
            'clientOptions' => [
                'autoclose' => false,
                'format' => 'yyyy-mm-dd'
            ]
        ]);
    ?>

    <?= $form->field($model, 'event_end_date')->widget(
        DatePicker::className(), [
            // inline too, not bad
            'inline' => false,
            'clientOptions' => [
                'autoclose' => false,
                'format' => 'yyyy-mm-dd'
            ]
        ]);
    ?>

i've use same widget in one form, and event_start_date its show up but event_end_date not show up any suggestion?