网上若干类似的控件,要么是有bug,要么是操作体验不合理,这里贡献一个比较科学的版本。

Extjs4 DateTimeField,日期时间控件完美版

扩展包下载:

https://files.cnblogs.com/qidian10/Ext.ux.rar

解压至Ext/UX里面,即可使用。唯一的缺陷就是使用daterange的时候会报错,读者可以自己解决

requires: ['Ext.ux.picker.DateTime', 'Ext.ux.form.field.DateTime'],
.....
{ text:
'上课时间', menuDisabled: true, sortable: true, width:150, dataIndex: 'StartTime', editor: { xtype: 'datetimefield', format: 'Y-m-d H:i', minValue: new Date(), allowBlank: false //, //id: 'gcstart', //endDateField: 'gcend', //vtype: 'daterange' } }, { text: '下课时间', menuDisabled: true, sortable: true, width: 150, dataIndex: 'EndTime', editor: { xtype: 'datetimefield', format: 'Y-m-d H:i', minValue: new Date(), allowBlank: false //, //id: 'gcend', //startDateField: 'gcstart', //vtype: 'daterange' } }

 

相关文章:

  • 2022-12-23
  • 2022-01-12
  • 2021-12-04
  • 2021-11-05
  • 2022-12-23
  • 2022-01-09
  • 2022-12-23
  • 2021-12-28
猜你喜欢
  • 2021-08-05
  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-28
相关资源
相似解决方案