DateTimePicker控件为空 分类: WinForm 2014-04-15 09:46 239人阅读 评论(0) 收藏

设置属性:
                Format=Custom


加载事件:ValueChanged
   private void dtpStart_ValueChanged(object sender, EventArgs e)
        {//日期默认为空
            this.dtpStart.CustomFormat = null;
        }

在_load事件中:
            this.dtpStart.Format = DateTimePickerFormat.Custom;
            this.dtpStart.CustomFormat = "  ";//中间要有空格






     

版权声明:本文为博主原创文章,未经博主允许不得转载。

posted @ 2014-04-15 09:46  Jackerson  阅读(144)  评论(0)    收藏  举报