Set to null?

4 posts, 0 answers
  1. Jonathan Miller
    Jonathan Miller avatar
    57 posts
    Member since:
    Jun 2008

    Posted 05 May 2009 Link to this post

    How can I set the display date to null?  I need an empty box if no date is selected. Thanks
  2. Konstantin Petkov
    Konstantin Petkov avatar
    1911 posts

    Posted 06 May 2009 Link to this post

    Hi Jonathan,

    Thank you for your question.

    If you need an empty text box in the DatePicker you can use the SelectedDate property which is of nullable DateTime (DateTime?) type. That said you can always set it to null:

    RadDatePicker2.SelectedDate = null;

    Is this what you need? Let us know if you need further assistance.

    Konstantin Petkov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. SivaPrasad Bevara
    SivaPrasad Bevara avatar
    73 posts
    Member since:
    Oct 2012

    Posted 02 Aug 2010 Link to this post


    I am facing the similar problem.
    I need to set the DatePicker value to empty.
    If I set the SelectedValue Property to "null", then it is displaying the "Enter Date" default text in the DatePicker. But I need to show the complete empty box (without any default text in it).
    Please help me.

  4. Boyan
    Boyan avatar
    758 posts

    Posted 04 Aug 2010 Link to this post

    Hi SivaPrasad Bevara,

    You need to set DateTimeWatermarkContent property to empty string:
    <telerik:RadDatePicker  Height="30" Width="200" VerticalAlignment="Top" DateTimeWatermarkContent=""/>
    With this property you can also customize the empty message to something different than "Select date".

    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