Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add additional css class to Yii2 jui datepicker

I am trying to make the text box of jui DatePicker in Yii2 look more like the other text boxes, by adding 'form-control' to the class name of the input control, when rendered.

I tried using clientOptions like this...

'clientOptions' => [ 'class' => 'form-control' ]

'clientOptions' => [ 'className' => 'form-control' ]

...and also as widget options, but am unable to figure this out.

Compared to Bootstrap Datetimepicker, the jui one looks really ugly.

Any ideas how I can add a class or make it look like other textboxes?

I have a simple datepicker, no fancy formattings, but am using it in my model.

like image 676
Shahid Thaika Avatar asked Jun 11 '15 06:06

Shahid Thaika


1 Answers

Figured it out. It was simply...

'options' => ['class' => 'form-control']
like image 169
Shahid Thaika Avatar answered Oct 18 '22 01:10

Shahid Thaika