I would like to be able to display a DateTimePicker which has a default of nothing, i.e. no date.
For example, I have a dtTaskStart start dtTaskStart and a dtTaskStart end dtTaskEnd for the task, but the end date is unknown and not populated initially.
I specified a custom format yyyy-MM-dd for both controls.
Setting it to null or an empty string at runtime causes an error, so how can I do this?
I have considered using a checkbox to control the inclusion of this field, but there is still the problem of displaying the initial value.
Edit:
It may be a duplicate of the DateTimePicker Null Value (.NET) question, but the solution I found for my problem is not the solution for this question, so I think it should stay here for others to find ..
brasskazoo May 11 '09 at 12:49 a.m. 2009-05-11 00:49
source share