This is a migrated thread and some comments may be shown as answers.
2 DateTimePicker and NullDate Problem
5 Answers 31 Views
This is a migrated thread and some comments may be shown as answers.
NorthGates
Top achievements
Rank 1
NorthGates asked on 09 Feb 2013, 08:26 AM
I use 2 DateTimePicker, one for FromDate and one for ToDate.

I like the idea of displaying null text ie: 'From Begining' and 'To End' but my problem is that for some reason whatever I set NullDate for the ToDate, it returns MinDate value.

How can I make it choose the MaxDate when using SetToNullValue. I tried many variations but alas.

PS.: I have one DatePicker on a UserControl and have 2 copies of the user control on a form and I added properties to the usercontrol to set date.value, MinDate, MaxDate, NullText, NullDate, SetToNullValue..

5 Answers, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 13 Feb 2013, 07:58 AM
Hi Luc,

We recommend using the NullableValue property in this scenario. Its type is nullable and it will allow you to check for null values. Please note that you cannot set the Value of RadDateTimePicker to MaxDate.

If this does not help, please describe in detail what exactly you want to achieve. This will help us to provide you with a proper solution.

If you have other questions, do not hesitate to contact us.

All the best,
Jack
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
0
Eddie
Top achievements
Rank 1
answered on 25 Jun 2013, 02:59 PM
Where do you get NullableValue?
0
Stefan
Telerik team
answered on 28 Jun 2013, 07:33 AM
Hi Eddie,

NullableValue is a property of RadDateTimePicker control introduced to support null as value of the control without introducing breaking changes.

I hope this helps.
 

Regards,
Stefan
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
tom
Top achievements
Rank 1
answered on 11 Jul 2013, 07:55 PM
Do you have any vb examples of how to implement this nullvalue,

if I have a date field that doesn't always require a date, so I need the display to not show a date until they select one. I like the idea of  showing "Enter SOLD Date" or whetever  until they select a date but cannot get that to work. I keep getting min date displayed, so id like an example in vb.net if possible

thanks!

Tom

0
Stefan
Telerik team
answered on 16 Jul 2013, 10:37 AM
Here you are Tom:
radDateTimePicker1.NullText = "Enter SOLD Date"
radDateTimePicker1.NullableValue = Nothing

Regards,
Stefan
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Asked by
NorthGates
Top achievements
Rank 1
Answers by
Jack
Telerik team
Eddie
Top achievements
Rank 1
Stefan
Telerik team
tom
Top achievements
Rank 1
Share this question
or