Cmaskedtextfield

I am developing a project regarding university academic work. I need to mask the text field to enter the academic year in ‘yyyy/yyyy’ format.

I have used the following code but it just create a normal text box and also some CJuiDatePicker’s are also not working

$this->widget(‘CMaskedTextField’, array(

‘model’ => $model,

‘attribute’ => ‘Year’,

‘name’=>‘Year’,

‘mask’ => ‘9999/9999’,

‘completed’=>‘function{alert(1);}’,

‘htmlOptions’ => array(‘size’ => 9)

));

Sorry, I think this is an Yii 1 topic… and I think you are missing to include the headers! If you don’t include the needed js and css it fails…!