Setting MinDate but Not Value

2 posts, 0 answers
  1. Raventhorn
    Raventhorn avatar
    61 posts
    Member since:
    Mar 2005

    Posted 11 Feb 2010 Link to this post

    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.
  2. Boyko Markov
    Boyko Markov avatar
    610 posts

    Posted 12 Feb 2010 Link to this post

    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.
Back to Top