Monday, June 29, 2009

Setting C# Date Time Picker Empty

Usually in C# DateTimePicker component is initialized with a default date. To use a blank or empty value in DateTimePicker set the Format property to Custom and the CustomFormat property to a space (" "), see the following code:

dtpDate.CustomFormat = " "
dtpDate.Format = DateTimePickerFormat.Custom

No comments:

Post a Comment

Search