DevExpress.XtraEditors.DateEdit 设置日期格式

修改一下属性就行

 this.txtTime.Properties.DisplayFormat.FormatString = "yyyy-MM-dd";
 this.txtTime.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
 this.txtTime.Properties.EditFormat.FormatString = "yyyy-MM-dd";
 this.txtTime.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
 this.txtTime.Properties.Mask.EditMask = "yyyy-MM-dd";
 this.txtTime.Properties.Mask.UseMaskAsDisplayFormat = true;

 

 

posted @ 2022-10-27 13:23  小杨观世界  阅读(326)  评论(0编辑  收藏  举报