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

Set to null?

3 Answers 156 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
Jonathan Miller
Top achievements
Rank 1
Jonathan Miller asked on 06 May 2009, 12:07 AM
How can I set the display date to null?  I need an empty box if no date is selected. Thanks

3 Answers, 1 is accepted

Sort by
0
Konstantin Petkov
Telerik team
answered on 06 May 2009, 07:59 AM
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.

Greetings,
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.
0
SivaPrasad Bevara
Top achievements
Rank 1
answered on 02 Aug 2010, 09:00 AM
Hi,

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.

Thanks,
Siva
0
Boyan
Telerik team
answered on 04 Aug 2010, 09:06 AM
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".


Regards,
Boyan
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
DatePicker
Asked by
Jonathan Miller
Top achievements
Rank 1
Answers by
Konstantin Petkov
Telerik team
SivaPrasad Bevara
Top achievements
Rank 1
Boyan
Telerik team
Share this question
or