从删除的DateTimePicker日期为精简框架 [英] remove date from DateTimePicker for Compact Framework

查看:161
本文介绍了从删除的DateTimePicker日期为精简框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

但有没有可能为null日期或删除文本字段日期。

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

如何从文本字段删除日期或如何文本字段使用的DateTimePicker连接

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

推荐答案

要显示空白,您可以将其设置为

To display blank you can set it as

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

和后来却把的ValueChanged 格式事件到所需的格式。该选择器不允许空值,因为它需要一个有效的DateTime对象

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

这篇关于从删除的DateTimePicker日期为精简框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆