ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Restrict TimePicker, list of times
Title:
B
I
{code}
?
I am using this from your demo: @(Html.Awe().AjaxRadioList("TimePicker1") .TimePicker(o => o.Caption("time please").Step(15))) My Question is: How Can I restrict the dropdown list of times shown to only a specific period e.g. daylight hours
Save Changes
Cancel
Clifton Nurse
asked at 17 Feb 2020
Answers
B
I
{code}
?
The timepicker doesn't have a min max feature, but what you could do instead is use a combobox, or an odropdown (if you don't need manual input), and for `DataFunc` set a js function that will return the items (KeyContent[]) with the values that you need. You could have a look in awem.js, search for `function timepicker` and copy and modify the data function from there. The most basic example of a data function would be: function getTimes(){ return [{ k: '6:30', v: '6:30' }]; } and the html helper: @(Html.Awe().AjaxRadioList("TimePicker1") .DataFunc("getTimes") .Odropdown())
Save Changes
Cancel
Omu
answered at 17 Feb 2020
As usual Thanks for a quick reply. Awesome!
at 17 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