PDA

View Full Version : how to change the alias



mohaskuar
3 Dec 2013, 11:38 PM
var start=Ext.define('Ext.ux.form.field.DateTime', {
extend:'Ext.form.FieldContainer',
fieldLabel: 'start Date',
mixins: {
field: 'Ext.form.field.Field'
},
alias: 'widget.startdate',
layout: 'hbox',
width: 300,
height: 22,
combineErrors: true,
msgTarget :'side',
allowBlank: false ,

dateCfg:{},
timeCfg:{},
initComponent: function() {
var me = this;
me.buildField();
me.callParent();
this.dateField = this.down('datefield');
this.timeField = this.down('timefield');
me.initField();
}



var endDate =new start ();
endDate.setFieldLabel('End Date');
// endDate.setAlias('enddate');



my question is how can i change the alias value of endDate like i have change the filedLable i tried

endDate.setAlias('enddate'); but doesnt work any ideas..please

evant
4 Dec 2013, 12:00 AM
You can't, an alias is like a short name for a class. Once you defined it, that's it.

mohaskuar
4 Dec 2013, 12:26 AM
ok Thanks...that was really fast