dev日期控件输入格式yyyyMMdd和yyyy-MM-dd笔记
2018-01-02 23:01
711 查看
=====================(yyyyMMdd)==============================
this.dateEdit1.EditValue = null;
this.dateEdit1.Location = new System.Drawing.Point(100, 125);
this.dateEdit1.Name = "dateEdit1";
this.dateEdit1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.dateEdit1.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.dateEdit1.Properties.CalendarTimeProperties.EditFormat.FormatString = "yyyyMMdd";
this.dateEdit1.Properties.DisplayFormat.FormatString = "yyyyMMdd";
this.dateEdit1.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Custom;
this.dateEdit1.Properties.EditFormat.FormatString = "yyyyMMdd";
this.dateEdit1.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.Custom;
this.dateEdit1.Properties.Mask.AutoComplete = DevExpress.XtraEditors.Mask.AutoCompleteType.None;
this.dateEdit1.Properties.Mask.EditMask = resources.GetString("dateEdit1.Properties.Mask.EditMask");
this.dateEdit1.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.RegEx;
this.dateEdit1.Properties.Mask.ShowPlaceHolders = false;
this.dateEdit1.Size = new System.Drawing.Size(179, 20);
this.dateEdit1.TabIndex = 5;
=====================(yyyy-MM-dd)==============================
this.dateEdit1.EditValue = null;
this.dateEdit1.Location = new System.Drawing.Point(100, 125);
this.dateEdit1.Name = "dateEdit1";
this.dateEdit1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.dateEdit1.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.dateEdit1.Properties.CalendarTimeProperties.EditFormat.FormatString = "yyyy-MM-dd";
this.dateEdit1.Properties.DisplayFormat.FormatString = "yyyy-MM-dd";
this.dateEdit1.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Custom;
this.dateEdit1.Properties.EditFormat.FormatString = "yyyy-MM-dd";
this.dateEdit1.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.Custom;
this.dateEdit1.Properties.Mask.AutoComplete = DevExpress.XtraEditors.Mask.AutoCompleteType.None;
this.dateEdit1.Properties.Mask.EditMask = "(([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29)";
this.dateEdit1.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.RegEx;
this.dateEdit1.Properties.Mask.ShowPlaceHolders = false;
this.dateEdit1.Size = new System.Drawing.Size(179, 20);
this.dateEdit1.TabIndex = 5;
this.dateEdit1.EditValue = null;
this.dateEdit1.Location = new System.Drawing.Point(100, 125);
this.dateEdit1.Name = "dateEdit1";
this.dateEdit1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.dateEdit1.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.dateEdit1.Properties.CalendarTimeProperties.EditFormat.FormatString = "yyyyMMdd";
this.dateEdit1.Properties.DisplayFormat.FormatString = "yyyyMMdd";
this.dateEdit1.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Custom;
this.dateEdit1.Properties.EditFormat.FormatString = "yyyyMMdd";
this.dateEdit1.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.Custom;
this.dateEdit1.Properties.Mask.AutoComplete = DevExpress.XtraEditors.Mask.AutoCompleteType.None;
this.dateEdit1.Properties.Mask.EditMask = resources.GetString("dateEdit1.Properties.Mask.EditMask");
this.dateEdit1.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.RegEx;
this.dateEdit1.Properties.Mask.ShowPlaceHolders = false;
this.dateEdit1.Size = new System.Drawing.Size(179, 20);
this.dateEdit1.TabIndex = 5;
=====================(yyyy-MM-dd)==============================
this.dateEdit1.EditValue = null;
this.dateEdit1.Location = new System.Drawing.Point(100, 125);
this.dateEdit1.Name = "dateEdit1";
this.dateEdit1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.dateEdit1.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.dateEdit1.Properties.CalendarTimeProperties.EditFormat.FormatString = "yyyy-MM-dd";
this.dateEdit1.Properties.DisplayFormat.FormatString = "yyyy-MM-dd";
this.dateEdit1.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Custom;
this.dateEdit1.Properties.EditFormat.FormatString = "yyyy-MM-dd";
this.dateEdit1.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.Custom;
this.dateEdit1.Properties.Mask.AutoComplete = DevExpress.XtraEditors.Mask.AutoCompleteType.None;
this.dateEdit1.Properties.Mask.EditMask = "(([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29)";
this.dateEdit1.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.RegEx;
this.dateEdit1.Properties.Mask.ShowPlaceHolders = false;
this.dateEdit1.Size = new System.Drawing.Size(179, 20);
this.dateEdit1.TabIndex = 5;
相关文章推荐
- Winform之TextBox输入日期格式验证yyyy-mm-dd
- WinForm 中要求在textBox中输入的内容必须是日期格式yyyy-mm-dd,判断用户输入是否有效!
- WPF中datePicker1控件获取中的日期格试为YYYY-MM-DD 转换成yyyMMdd格式
- WinForm 中要求在textBox中输入的内容必须是日期格式yyyy-mm-dd,判断用户输入是否有效!
- DevExpress 中 DateEdit 控件 格式化显示和编辑的日期格式为: yyyy-MM-dd
- 黑马程序员---------------------编写程序,该程序启动后用户可以按“yyyy-MM-dd”的格式输入一个日期, * 程序计算这一天是星期几,并且计算出是一年中的第几天
- 限制文本框输入YYYY-MM-DD格式的日期
- 给定一个日期,输出这个日期是该年的第几天。输入数据有多组,每组占一行,数据格式为 YYYY/MM/DD组成,具体参见sample input ,另外,可以向你确保所有的输入数据是合法的。
- java利用正则表达式判断输入的日期格式为yyyy/MM/dd
- 黑马程序员—编写程序,该程序启动后用户可以按“yyyy-MM-dd”的格式输入一个日期, *程序计算这一天是星期几,并且计算出是一年中的第几天。 */
- oracle中日期格式'yyyy-mm-dd'和'yyyymmdd'的区别
- dojo中DateTextBox日期格式yyyy-MM-dd转化为数据库中yyyyMMdd
- JS验证类似"YYYY-MM-DD"格式的日期输入
- 黑马程序员 测试题:编写程序,该程序启动后用户可以按“yyyy-MM-dd”的格式输入一个日期,程序计算这一天是星期几,并且计算出是一年中的第几天
- 编写程序,该程序启动后用户可以按“yyyy-MM-dd”的格式输入一个日期,程序计算这一天是星期几,并且计算出是一年中的第几天
- Excel限定输入日期格式是yyyy-mm-dd(亲自实践)
- 日期查询:把easyUI的日期格式转成yyyy-MM-dd格式
- 将yyyyMMdd、yyyy-MM-dd格式的字符转成日期DateTime格式
- vb.net 如何设置日期格式为yyyy-mm-dd
- (1)js 获取当前日期 前N天或者后N天日期 且可指定格式 如yyyy-mm-dd等