Код: Выделить всё
$this->registerJsFile('https://cdnjs.cloudflare.com/ajax/libs/jquery.mask/1.14.3/jquery.mask.js');
использую такой
Код: Выделить всё
$this->registerJs('jQuery('.phone').mask('0000-0000')');
Код: Выделить всё
<?= $form->field($model, 'number')->textInput(['id' => 'phone']) ;?>
Подозрение что jquery не подключаеться после как разрешить ошыбку?jquery.mask.js:415 Uncaught TypeError: Cannot set property 'maskWatchers' of undefined
(anonymous function) @ jquery.mask.js:415
(anonymous function) @ jquery.mask.js:49
(anonymous function) @ jquery.mask.js:52
signup:493 Uncaught TypeError: jQuery(...).mask is not a function
(anonymous function) @ signup:493
fire @ jquery.js:3187
self.fireWith @ jquery.js:3317
jQuery.extend.ready @ jquery.js:3536
completed @ jquery.js:3552