DateTimePicker

  • Thread starter Thread starter Anders Johansson
  • Start date Start date
A

Anders Johansson

Hi!

I'm using the DateTimePicker from OpenNetCF.
Is there a possibility not showing a date at all.
I just want the date to be blank if the user has not choosen a date.

Thanks in advance

Anders
 
hi anders,

I had a similar requirement. I used the datetimepicker sample from msdn. I
extended the class so that a certain date (1/1/1801) is treated as a null
and a blank string is displayed. I also added a "Clear" text at the bottom
of the popup date picker control. Clicking this sets the value to 1/1/1801
and I modified the code to show a blank string in the text property whenever
the value = 1/1/1801. This is a hack but it works quite well for me.
When I try and assign a null value to the control, i simply assign 1/1/1801.
Let me know if you want any source code ( I will email you my code directly)

hth,
sai
 
Back
Top