This is a migrated thread and some comments may be shown as answers.

RadDatePicker: How to change values for the popup list of a RadTimePicker using javascript?

1 Answer 65 Views
Input
This is a migrated thread and some comments may be shown as answers.
Matthias
Top achievements
Rank 1
Matthias asked on 27 Jul 2018, 05:04 PM

Hello together, i don't get it working...

How can i change the start/end/interval values for the popup list of RadTimePicker clientside using javascript and how to repait that after manipulating?

I can read all the values with the apropriate methods:

  • get_startTime() -> returns my start date
  • get_endTime() -> returns my end date
  • get_interval() -> returns my interval date

Here is a sample code how i try to manipulate this (sample of an end-time):

1.... get the endTimePicker...
2.var timeView = endTimePicker.get_timeView();
3.var endTime = timeView.getTime();
4.endTime.setHours(17);
5.endTime.setMinutes(0);
6.endTime.setSeconds(0);
7.timeView.set_endTime(endTime);

 

After manipulation, i try to write it back to the object:

  • set_startTime(<manipulated start date>) 
  • set_endTime(<manipulated end date>)
  • set_interval(<manipulated interval date>)

Whe i than read the properties again, i only get the message "invalid date".

How can i manipulate these values in the correct way?

How can i repaint the popup list after the manipulation? With <timepicker-object>.repaint() ?

 

Thanks a lot for thinking about that.

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 01 Aug 2018, 08:30 AM
Hi Matthias,

You can achieve this requirement on server-side:
https://docs.telerik.com/devtools/aspnet-ajax/controls/datetimepicker/functionality/configuring-the-embedded-time-view

I hope this will prove helpful.

Regards,
Eyup
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Input
Asked by
Matthias
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or