remove date from DateTimePicker for Compact Framework

不问归期 提交于 2019-12-08 03:15:34

问题


http://msdn.microsoft.com/en-us/library/aa446530.aspx

but there is no possibility to null date or to delete date from text field.

how to remove date from textfield or how to connect TextField with DateTimePicker


回答1:


To display blank you can set it as

DateTimePicker1.Format = DateTimePickerFormat.Custom;
DateTimePicker1.CustomFormat = "";

and then reset the format in ValueChanged event to the desired format. The picker doesn't allow null values since it requires a valid DateTime object.

You may choose to have a custom control also as found here



来源:https://stackoverflow.com/questions/7554056/remove-date-from-datetimepicker-for-compact-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!