I would like to be able to display null values in a datetime picker control.
I am using one datetime picker control for both datadisplay and data entry. when I load the data from the database and if there is no date then the datetime picker control must be blank.
Is there a way to accomplish this??
Many thanks
3 Replies - 4460 Views - Last Post: 24 May 2011 - 11:16 AM
Replies To: DISPLAYING NULL VALUES IN A DATETIME PICKER CONTROL
#2
Re: DISPLAYING NULL VALUES IN A DATETIME PICKER CONTROL
Posted 23 May 2011 - 05:09 PM
Sorry, I've not found a way to do it but you could use a textbox and a calender control to build your own and allow blank entries.
Another thing I've done is set the default to 01/01/1900 and if that is what the date is at the time of storing, leave that field blank.
The only problem with this method is when you click to change the date you are a long way off from the current date making it not very user friendly. Not to mention, most uses would see that date and feel obligated to set it to something different.
Another thing I've done is set the default to 01/01/1900 and if that is what the date is at the time of storing, leave that field blank.
The only problem with this method is when you click to change the date you are a long way off from the current date making it not very user friendly. Not to mention, most uses would see that date and feel obligated to set it to something different.
#3
Re: DISPLAYING NULL VALUES IN A DATETIME PICKER CONTROL
Posted 23 May 2011 - 05:31 PM
CharlieMay, on 23 May 2011 - 05:09 PM, said:
Sorry, I've not found a way to do it but you could use a textbox and a calender control to build your own and allow blank entries.
Another thing I've done is set the default to 01/01/1900 and if that is what the date is at the time of storing, leave that field blank.
The only problem with this method is when you click to change the date you are a long way off from the current date making it not very user friendly. Not to mention, most uses would see that date and feel obligated to set it to something different.
Another thing I've done is set the default to 01/01/1900 and if that is what the date is at the time of storing, leave that field blank.
The only problem with this method is when you click to change the date you are a long way off from the current date making it not very user friendly. Not to mention, most uses would see that date and feel obligated to set it to something different.
Thank you very much for your reply. I somehow knew that I will have to do the stuff myself just like you proposed. I was thinking about a trick to change the fontcolor to white (white over white)in the text area of the datetime picker control to simulate a blank date, but it seems that the fontcolor in the datepicker control cant change either...
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote





|