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

Setting MinDate but Not Value

1 Answer 121 Views
Calendar, DateTimePicker, TimePicker and Clock
This is a migrated thread and some comments may be shown as answers.
Raventhorn
Top achievements
Rank 2
Raventhorn asked on 11 Feb 2010, 03:49 PM
I have two DateTimePicker controls on a form that represent Start and End dates. I want the initially to be empty which I figured out how to do by assigning the value a database null value of 1/1/0001. The problem is that when I go to use the drop down the start date is 1/1/1900. Navigating all the way to current day is painful to the user.

Is there a way to assign the MinDate to a value like DateTime.Now but leave the value property empty? That would be the ideal scenario as my application does allow these fields to be unspecified.

1 Answer, 1 is accepted

Sort by
0
Boyko Markov
Telerik team
answered on 12 Feb 2010, 10:37 AM
Hi Armysniper,

Yes there is such a way. You can do this by using the NullDate property. When the Value of RadDateTimePicker control is equal to NullDate, the control will show an empty field and the calendar popup will be opened and focused on RadDateTimePicker Value. For example:

this.radDateTimePicker1.NullDate = DateTime.Today.Date.AddSeconds(1);
         
I hope this helps. Please feel free to contact us back in case you need more assistance.

All the best,
Boyko Markov
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.
Tags
Calendar, DateTimePicker, TimePicker and Clock
Asked by
Raventhorn
Top achievements
Rank 2
Answers by
Boyko Markov
Telerik team
Share this question
or