I am trying to use yii\jui\DatePicker but for some reason DatePicker is not rendering the jquery ui widget. As a result clicking the input field does not open calendar. Firebug is not showing anything.. any thought about the cause of this?
Here is my code:
<?php use yii\jui\DatePicker; ?>
<?=
DatePicker::widget([
'model' => $model,
'attribute' => 'entryDate',
'language' => Yii::$app->language,
'dateFormat' => 'yyyy-MM-dd',
]);
?>
I have tried to implement the above in a new yii2 basic template and it works fine. I wonder what could be the problem in my existing project.
Other components in my view are yii\helpers\Html yii\widgets\ActiveForm. Below is my view:
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\jui\DatePicker;
$this->title = Html::encode($this->context->getShopNameByUserId(Yii::$app->user->id));
?>
<div class="content">
<div class="main-content">
<div class="widget widget-table">
<div class="widget-header" style="padding-right:0px;">
<h3><i class="fa fa-credit-card"></i> <?= Yii::t('user', 'Add/Edit Coupon') ?></h3>
</div>
<div class="widget-content">
<?php $form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]) ?>
<?=
DatePicker::widget([
'model' => $model,
'attribute' => 'entryDate',
'language' => Yii::$app->language,
'dateFormat' => 'yyyy-MM-dd',
]);
?>
<?= Html::submitButton(Yii::t('user', 'Save'), ['class' => 'btn btn-custom-primary']) ?>
<?php ActiveForm::end(); ?>
</div>
</div>
</div>