raimund@550: Ext.define('Ext.ux.form.DateTimeField', { raimund@550: extend: 'Ext.form.field.Date', raimund@550: alias: 'widget.datetimefield', raimund@550: requires: ['Ext.ux.DateTimePicker'], raimund@550: raimund@550: initComponent: function() { raimund@550: this.format = this.format + ' ' + 'H:i:s'; raimund@550: this.callParent(); raimund@550: }, raimund@550: // overwrite raimund@550: createPicker: function() { raimund@550: var me = this, raimund@550: format = Ext.String.format; raimund@550: raimund@550: return Ext.create('Ext.ux.DateTimePicker', { raimund@550: ownerCt: me.ownerCt, raimund@550: renderTo: document.body, raimund@550: floating: true, raimund@550: hidden: true, raimund@550: focusOnShow: true, raimund@550: minDate: me.minValue, raimund@550: maxDate: me.maxValue, raimund@550: disabledDatesRE: me.disabledDatesRE, raimund@550: disabledDatesText: me.disabledDatesText, raimund@550: disabledDays: me.disabledDays, raimund@550: disabledDaysText: me.disabledDaysText, raimund@550: format: me.format, raimund@550: showToday: me.showToday, raimund@550: startDay: me.startDay, raimund@550: minText: format(me.minText, me.formatDate(me.minValue)), raimund@550: maxText: format(me.maxText, me.formatDate(me.maxValue)), raimund@550: listeners: { raimund@550: scope: me, raimund@550: select: me.onSelect raimund@550: }, raimund@550: keyNavConfig: { raimund@550: esc: function() { raimund@550: me.collapse(); raimund@550: } raimund@550: } raimund@550: }); raimund@550: } raimund@550: });