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..
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
0
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
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
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
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 >>
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
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
Here you are Tom:
Regards,
Stefan
Telerik
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 >>
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 >>