Do you mind doing 2 things:

1) add a value to 'disabled'
2) remove it

its confusing that you have ' disabled: "" ' as it means that out of the
options you dont want to disable any and you can achieve that by not added
the 'disabled' attribute.

On Wed, Jun 29, 2016 at 11:30 AM, Aashish Kiran <[email protected]>
wrote:

> Hi, I have a problem with rails time_select. I want to disable
> time_select while page load.
>
> <%= h.time_select dow + "_start_time",{minute_step: 15, ampm: true},
> {class: 'test', disabled: ''}  %>
>
> generated html is
>
> <select class="" name="account[start_time(4i)]"
> id="account_start_time_4i">
> <option selected="selected" value="00">12 AM</option>
> <option value="01">01 AM</option>
> <option value="02">02 AM</option>
> <option value="03">03 AM</option>
> <option value="04">04 AM</option>
> <option value="05">05 AM</option>
> <option value="06">06 AM</option>
> <option value="07">07 AM</option>
> <option value="08">08 AM</option>
> <option value="09">09 AM</option>
> <option value="10">10 AM</option>
> <option value="11">11 AM</option>
> <option value="12">12 PM</option>
> <option value="13">01 PM</option>
> <option value="14">02 PM</option>
> <option value="15">03 PM</option>
> <option value="16">04 PM</option>
> <option value="17">05 PM</option>
> <option value="18">06 PM</option>
> <option value="19">07 PM</option>
> <option value="20">08 PM</option>
> <option value="21">09 PM</option>
> <option value="22">10 PM</option>
> <option value="23">11 PM</option>
> </select>
>
>
> The above erb code generates 'class' attribute. 'disabled' attribute is
> not being created.
>
> Can you help
>
> Thanks,
> Aashish
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/8c30b2a7c89abb6c2ddee3747dce3818%40ruby-forum.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CANkJ5gkrnUPJyujbTZfQRxLvPN4FNeS2OreyXZ99uhLencWCaQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to