I have a problem of making a DateTimePicker control to support null/empty value.
I will have to make it 2 ways, which are :
1. User input on form and let the DateTimePicker null/empty. Then, I will save it to String type as "-".
2. If later the user edit the form, I must load all the user input value including the String value of "-", so there will be a checking condition, if String == "-" then the DateTime will be null/empty..
Someone told me to use DTS_SHOWNONE which is the DateTimePicker style.
I have read it here:
but I don't understand how to implement it to my codes..
does anybody know how to implement it? If it possible, please give me along with the code..
However, if you want the DateTimePicker to show empty string if no date selected, you can override the Format and CustomFormat properties, for more details, see this article: Yet Another Nullable DateTimePicker Control