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

datetimepicker

3 Answers 56 Views
DateTimePicker
This is a migrated thread and some comments may be shown as answers.
Okan Sokmen
Top achievements
Rank 1
Okan Sokmen asked on 05 Aug 2010, 10:20 PM
Hi everyone

I am trying to get today with a simple method from datetimepicker. I am open to suggestions :) My current workaround is to add an event handler for double clicking the datetimepickers and setting their values to today inside the handler. But inorder to deploy this method i had to write a double click event handler to all the datetimepickers in the program. I saw in another datetimepicker control (from another component provider) a small today button located on the middle bottom of the drop down calendar which does the job of taking you quickly to today...

Any suggestions ....

Best regards

Okan Sokmen

3 Answers, 1 is accepted

Sort by
0
Boryana
Telerik team
answered on 11 Aug 2010, 10:34 AM
Hi Okan Sokmen,

Thank you for contacting us.

The footer of the RadCalendar appearing in the popup of the RadDateTimePicker contains a Today button. However, you will still need to handle its Click event and manually set the value of the RadDateTimePicker. This approach is illustrated in the attached sample project.

Please let me know whether the provided solution works in your scenario.

Best wishes,
Boryana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Igor
Top achievements
Rank 1
answered on 16 Aug 2011, 03:34 PM
Why isn't this a property with in the datetimepicker? Why do we need to subclass or add this into our regular code just to get a today button?
0
Boryana
Telerik team
answered on 18 Aug 2011, 01:06 PM
Hello Igor,

Thank you for writing.

I am not quite sure I understand the meaning of your post. Do you mean that it will be more convenient for you to have the RadCalendar's ShowFooter property in the RadDateTimePicker's API?

If this is the case, let me explain that the decision not to include all the properties of RadCalendar in the RadDateTimePicker's API is entirely driven by the complexity of the latter control. Merging all properties will result in a difficult to understand API which is inconvenient for our clients. Another reason for us to keep the API of the different components of RadDateTimePicker separated is the fact that this control supports mode which does not include a calendar at all.

I hope you find this useful. Feel free to contact me back in case I have misunderstood your case.

Greetings,
Boryana
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Tags
DateTimePicker
Asked by
Okan Sokmen
Top achievements
Rank 1
Answers by
Boryana
Telerik team
Igor
Top achievements
Rank 1
Share this question
or