PDA

View Full Version : Ext.Menu.DatePicker



Weicheng.Huang
19 Nov 2013, 7:37 PM
Hi,

I set a button for getting all the value from the panel which includes this Menu.Datepicker. I set id for this componet ( Ext.Menu.DatePicker ), so I get var temp = Ext.getCmp('id'). I try to get date value for this component. However, I am stuck.

I tried

Ext.Date.format(temp , 'mdy') but it get the empty value.

My expectation is getting string for this componet ( like11062013 ).

Please give me some advice. Thanks in advanced.

Piruthu
19 Nov 2013, 10:30 PM
Try this way



// considering 'myDatePicker' is your picker components itemId
var myDate = Ext.ComponentQuery.query('#myDatePicker')[0].getValue();
console.log(' selected date ', Ext.Date.format(myDate, 'mdY'));

Weicheng.Huang
20 Nov 2013, 6:46 AM
I try but getvalue() is not a method for Ext.Menu.DatePicker (http://www.sencha.com/forum/showthread.php?276386-Ext.Menu.DatePicker).

Piruthu
20 Nov 2013, 7:51 PM
If its Menu.Datepicker, you can store the selected date on some var on 'select' and use it later..

IraidaGilyard
21 Nov 2013, 1:14 AM
hard to understand please explain those clearly here for a better assistance





Tevida (http://www.healthisgod.com/tevida-testosterone-booster/)

Weicheng.Huang
26 Nov 2013, 5:33 PM
The issue is I have a component ( Ext.Menu.DatePicker (http://www.sencha.com/forum/showthread.php?276386-Ext.Menu.DatePicker). ) and ID ("datepicker")

var datepick = Ext.getCmp(''datepicker); // get the Ext.Menu.DatePicker (http://www.sencha.com/forum/showthread.php?276386-Ext.Menu.DatePicker)

When I try to get the date which user selected on the Ext.Menu.DatePicker (http://www.sencha.com/forum/showthread.php?276386-Ext.Menu.DatePicker), datepick.getValue() is not able to get the value.

Do anyone knows how to get the date for Ext.Menu.DatePicker (http://www.sencha.com/forum/showthread.php?276386-Ext.Menu.DatePicker)