comparison resources/datetime/UX_DateTimeField.js @ 273:a282da79cfaa

Added datetimepicker from http://www.sencha.com/forum/showthread.php?137242-Ext.ux.DateTimeField-DateTimePicker-for-ext4-also-DateTimeMenu-TimePickerField
author Torsten Irländer <torsten.irlaender@intevation.de>
date Wed, 07 Aug 2013 11:59:50 +0200
parents
children
comparison
equal deleted inserted replaced
272:852dc338894e 273:a282da79cfaa
1 Ext.define('Ext.ux.form.DateTimeField', {
2 extend: 'Ext.form.field.Date',
3 alias: 'widget.datetimefield',
4 requires: ['Ext.ux.DateTimePicker'],
5
6 initComponent: function() {
7 this.format = this.format + ' ' + 'H:i:s';
8 this.callParent();
9 },
10 // overwrite
11 createPicker: function() {
12 var me = this,
13 format = Ext.String.format;
14
15 return Ext.create('Ext.ux.DateTimePicker', {
16 ownerCt: me.ownerCt,
17 renderTo: document.body,
18 floating: true,
19 hidden: true,
20 focusOnShow: true,
21 minDate: me.minValue,
22 maxDate: me.maxValue,
23 disabledDatesRE: me.disabledDatesRE,
24 disabledDatesText: me.disabledDatesText,
25 disabledDays: me.disabledDays,
26 disabledDaysText: me.disabledDaysText,
27 format: me.format,
28 showToday: me.showToday,
29 startDay: me.startDay,
30 minText: format(me.minText, me.formatDate(me.minValue)),
31 maxText: format(me.maxText, me.formatDate(me.maxValue)),
32 listeners: {
33 scope: me,
34 select: me.onSelect
35 },
36 keyNavConfig: {
37 esc: function() {
38 me.collapse();
39 }
40 }
41 });
42 }
43 });

http://lada.wald.intevation.org