ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
How to make time picker as read only
Title:
B
I
{code}
?
How to make this time picker as read only @(Html.Awe().AjaxRadioListFor(o => o.DefaultTime) .TimePicker(o => o.Caption("time please").Step(15)).HtmlAttributes(null, new { @readonly = "readonly" })) This code is giving below html in which hidden filed is getting the read-only property which is wrong <div class="awe-ajaxradiolist-field awe-field timep odfield"> <input readonly="readonly" name="DefaultTime" id="DefaultTime" class="awe-val" value="10:00 AM" type="hidden"> ... </div> I want to make this line as read-only <input type="text" class="awe-txt combotxt osearch" size="1" placeholder="time please">
Save Changes
Cancel
SalesARM
asked at 21 Apr 2019
Answers
B
I
{code}
?
if you want to disable it completely you can set: .Enabled(false) but if you want to just make the textbox readonly and still be able to select values from the dropdown, you could use this js: $('#id').parent().find('.o-src').attr('readonly', 'readonly')
Save Changes
Cancel
Omu
answered at 21 Apr 2019
thanks for the answer.. In my case (much older version) I used class osearch instead of o-src $('#DefaultTime').parent().find('.osearch').attr('readonly', 'readonly');
at 21 Apr 2019
SalesARM
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK