C# 控件 DevExpress的DateEdit设置显示日期和时间
Posted yunxia_云霞
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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;
以上是关于C# 控件 DevExpress的DateEdit设置显示日期和时间的主要内容,如果未能解决你的问题,请参考以下文章
DevExpress 利用DateEdit 仅显示和选择年份 z