ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Set the time value of the Html.Awe().TimePickerFor
Title:
B
I
{code}
?
I'm using the Html.Awe().TimePickerFor with the dropdown selections for hour, minute and AM/PM. I have a button beside it for the user to set the time to the current time when they choose not to type in that value. I am new to these controls and still trying to undersand how to program them for specific tasks. I have tried hard to set the value to a time/date string in javacript/jquery code but i simple have failed after more than 5 hours (including the demos which dont have much on time picker). I'm sure this must be easy for experienced users but please, Help!
Save Changes
Cancel
Clifton Nurse
asked at 22 Feb 2020
Answers
B
I
{code}
?
the `Awe().TimePicker` is the only component that doesn't support changing value using `$('#id').val('12:35 PM').change();` you could do that with the `Html.Awe().AjaxRadioList().Timepicker()` though. you can change the value of the `Awe().TimePicker` manually like this: $('#tmp1').parent().find('.awe-hour').val('10') $('#tmp1').parent().find('.awe-min').val('30') please note that the AmPm dropdown may or may not be present depending on the CurrentCulture
Save Changes
Cancel
Omu
answered at 22 Feb 2020
Geez. I tried so hard only to find out it doesn't support changing value. Changing value seemed so basic a property that i never thought of this. Thanks for your quick and Awesome support.
at 22 Feb 2020
Clifton Nurse
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