comparison resources/lib/datetime/UX_DateTimeField.js @ 550:b6875e900e3a

Added datetime library.
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 06 Mar 2015 12:44:44 +0100
parents
children
comparison
equal deleted inserted replaced
549:3aa74630d403 550:b6875e900e3a
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