javascripts/xdatetime.js in netzke-basepack-0.12.9 vs javascripts/xdatetime.js in netzke-basepack-1.0.0.0.pre
- old
+ new
@@ -1,15 +1,6 @@
-/**
- * @class Ext.ux.form.field.DateTime
- * @extends Ext.form.FieldContainer
- * @version 0.2 (July 20th, 2011)
- * @author atian25 (http://www.sencha.com/forum/member.php?51682-atian25)
- * @author ontho (http://www.sencha.com/forum/member.php?285806-ontho)
- * @author jakob.ketterl (http://www.sencha.com/forum/member.php?25102-jakob.ketterl)
- * @link http://www.sencha.com/forum/showthread.php?134345-Ext.ux.form.field.DateTime
- * from http://www.sencha.com/forum/showthread.php?134345-Ext.ux.form.field.DateTime&p=863449&viewfull=1#post863449
- */
+// From http://www.sencha.com/forum/showthread.php?134345-Ext.ux.form.field.DateTime&p=863449&viewfull=1#post863449
Ext.define('Ext.ux.form.field.DateTime', {
extend:'Ext.form.FieldContainer',
mixins:{
field:'Ext.form.field.Field'
},
@@ -20,56 +11,39 @@
combineErrors: true,
msgTarget: 'under',
layout: 'hbox',
readOnly: false,
- /**
- * @cfg {String} dateFormat
+ /*
* Convenience config for specifying the format of the date portion.
* This value is overridden if format is specified in the dateConfig.
* The default is 'Y-m-d'
*/
dateFormat: 'Y-m-d',
dateSubmitFormat: 'Y-m-d',
- /**
- * @cfg {String} timeFormat
+ /*
* Convenience config for specifying the format of the time portion.
* This value is overridden if format is specified in the timeConfig.
* The default is 'H:i:s'
*/
timeFormat: 'H:i:s',
- timeSubmitFormat: 'H:i:s',
-// /**
-// * @cfg {String} dateTimeFormat
-// * The format used when submitting the combined value.
-// * Defaults to 'Y-m-d H:i:s'
-// */
-// dateTimeFormat: 'Y-m-d H:i:s',
- /**
+ timeSubmitFormat: 'H:i:s',
+ /*
* @cfg {Object} dateConfig
* Additional config options for the date field.
*/
dateConfig:{},
- /**
+ /*
* @cfg {Object} timeConfig
* Additional config options for the time field.
*/
timeConfig:{},
-
// properties
dateValue: null, // Holds the actual date
- /**
- * @property dateField
- * @type Ext.form.field.Date
- */
dateField: null,
- /**
- * @property timeField
- * @type Ext.form.field.Time
- */
timeField: null,
initComponent: function(){
var me = this
,i = 0
@@ -81,11 +55,11 @@
me.dateField = Ext.create('Ext.form.field.Date', Ext.apply({
format:me.dateFormat,
flex:1,
isFormField:false, //exclude from field query's
submitValue:false,
- submitFormat: me.dateSubmitFormat,
+ submitFormat: me.dateSubmitFormat,
readOnly: me.readOnly
}, me.dateConfig));
me.items.push(me.dateField);
me.timeField = Ext.create('Ext.form.field.Time', Ext.apply({
@@ -164,17 +138,14 @@
}
return value;
},
getSubmitValue: function(){
-// var value = this.getValue();
-// return value ? Ext.Date.format(value, this.dateTimeFormat) : null;
-
var me = this
,format = me.getFormat()
,value = me.getValue();
- return value ? Ext.Date.format(value, format) : null;
+ return value ? Ext.Date.format(value, format) : "";
},
setValue: function(value){
if (Ext.isString(value)){
value = Ext.Date.parse(value, this.getFormat()); //this.dateTimeFormat