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

RadTimePicker, Step-property?

1 Answer 119 Views
Calendar, DateTimePicker, TimePicker and Clock
This is a migrated thread and some comments may be shown as answers.
Aron
Top achievements
Rank 1
Aron asked on 30 Apr 2015, 12:04 PM

There's a step property in the RadTimePicker, which I up untill this point believed set the amount of hours / minutes to step when the buttons in the timepicker were clicked, this however, doesn't seem to be the case. Why is there no step property for hours and minutes? 

 

To explain further: I want the user to only be able to step by one hour or by 30 minutes, is there no way of achieving this with the given properties existing within the Timepicker?

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 05 May 2015, 11:55 AM
Hi Aron,

Thank you for writing. 

The Step property of RadTimePicker sets the minutes step in the drop down element. In order to achieve your task you would need to access the MaskedEditBox.Provider of the TimePickerElement. Please see my code snippet below: 
private void SetStep()
{
    MaskDateTimeProvider provider = this.radTimePicker1.TimePickerElement.MaskedEditBox.Provider as MaskDateTimeProvider;
    provider.MinutesStep = 30;
    provider.HoursStep = 1;
}

I hope this helps. Should you have further questions please do not hesitate to write back.

Regards,
Hristo Merdjanov
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
Calendar, DateTimePicker, TimePicker and Clock
Asked by
Aron
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or