C# 控件 DevExpress的DateEdit设置显示日期和时间

this.dateEdit1.Properties.DisplayFormat.FormatString = "yyyy-MM-dd HH:mm";
this.dateEdit1.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
this.dateEdit1.Properties.EditFormat.FormatString = "yyyy-MM-dd HH:mm";
this.dateEdit1.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
this.dateEdit1.Properties.Mask.EditMask = "yyyy-MM-dd HH:mm";

this.dateEdit1.Properties.VistaDisplayMode = DevExpress.Utils.DefaultBoolean.True;
this.dateEdit1.Properties.VistaEditTime = DevExpress.Utils.DefaultBoolean.True;

this.dateEdit1.Properties.VistaTimeProperties.DisplayFormat.FormatString = "HH:mm";
this.dateEdit1.Properties.VistaTimeProperties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
this.dateEdit1.Properties.VistaTimeProperties.EditFormat.FormatString = "HH:mm";
this.dateEdit1.Properties.VistaTimeProperties.EditFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
this.dateEdit1.Properties.VistaTimeProperties.Mask.EditMask = "HH:mm";

 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

this.dateEdit2.Properties.DisplayFormat.FormatString = "yyyy-MM-dd HH:mm";
this.dateEdit2.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
this.dateEdit2.Properties.EditFormat.FormatString = "yyyy-MM-dd HH:mm";
this.dateEdit2.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
this.dateEdit2.Properties.Mask.EditMask = "yyyy-MM-dd HH:mm";
this.dateEdit2.Properties.VistaDisplayMode = DevExpress.Utils.DefaultBoolean.True;
this.dateEdit2.Properties.VistaEditTime = DevExpress.Utils.DefaultBoolean.True;

 

posted on 2017-01-20 10:04  yunxia_云霞  阅读(5852)  评论(0编辑  收藏  举报