Decided to connect to the project widget yii \ jui \ DatePicker http://www.yiiframework.com/doc-2.0/yii-jui-datepicker.html
Added to composer.json (as it is stated in the documentation https://github.com/yiisoft/yii2-jui to the widget) a line:
... "yiisoft/yii2-jui": "~2.0.0" ... Updated:
composer update Added to the template design code:
<?php echo \yii\jui\DatePicker::widget( [ 'name' => 'from_date', 'value' => '', 'language' => 'ru' ] ); ?> As a result, input appeared on the page:
<input type="text" id="w0" name="from_date" value=""> And also appeared JS-code:
<script type="text/javascript">jQuery(document).ready(function () { $('#w0').datepicker($.extend({}, $.datepicker.regional['ru'], {"dateFormat":"M d, yy"})); });</script> DatePicker did not work ... And the console displays an error:
jquery.js: 3793 Uncaught TypeError: Cannot read property 'regional' of undefined

<script src="/web/assets/6979d031/jquery.js"></script> <script src="/web/assets/ac9a3336/jquery-ui.js"></script> <script src="/web/assets/ac9a3336/ui/i18n/datepicker-ru.js"></script>- Bookin$.datepickerdoes not exist. That is, whether or notjquery-uion the page, or not yet loaded. Or do you have a duplicatejquery.js, maybe you are on the page somewhere in the manual connect jquery.js? - Bookin