-
Date picker parent
How can i set the parent to a specified element?
I have a container(main) which is a hbox.It has two containers(con1 and con2) with flex 1 and 4. I have the date picker field in con2 but the picker slides down from main container.
I want it to slide up from con2.
How can i do it?
-
-
I am calling the picker by a datepickerfield.
How do i call the showBy method?
Can u plz explain with an example.
here's my code:
xtype: 'datepickerfield',
name:'enddate',
readOnly:true,
id:'enddate',
label: 'Day',
labelWidth: '35%',
picker:{
id:'daypicker',
yearTo:2020,
yearFrom:2010
},
-
Sorry, I misunderstood your question.
Have you tried renderTo? http://docs.sencha.com/touch/2-1/#!/...r-cfg-renderTo
-
I tried that but then the picker didn't appeared.
I tried renderTo in datepickerfield and also in piicker. Nothing worked for me.
I might be wrong with the syntax. Can u plz help me out with the syntax.
I want the picker to appear in the container with id- feature,so I wrote
Code: rendeerTo:Ext.get('feature'),
Is this the correct way?
-
-
When feature is your id, it should be renderTo: Ext.Viewport.down('#feauture')
But I justed tested this and it doesn't make any difference.
I guess a picker is never displayed inside a container but always on top level.
-
this didn't help.
can u please help me out with this. I need that picker inside my container.
I tried out something and it worked but it wasn't the best way.
Code:
xtype: 'datepickerfield',
flex:1,
width:'50%',
label: 'Day',
id:'startday',
labelWidth: '35%',
value:new Date(),
picker:false,
listeners:{
focus:function(){
var datePicker = Ext.create('Ext.picker.Date',
{
yearTo:2022,
yearFrom:2012,
listeners:{
change:function(picker,value){
Ext.getCmp('startday').setValue(value);
},
painted:function(){
var value=Ext.getCmp('startday').getValue();
this.setValue(value);
}
}
});
Ext.getCmp('addevent').add(datePicker);
datePicker.show();
}
},
This way, i have the date picker inside the container but this is not the correct way..
Can u please figure a simple way.
-
Can anyone help me out with the above problem :(