13

I have a component in extjs store named date

How can i retrieve it ExtJS

Cœur
  • 37,241
  • 25
  • 195
  • 267
  • 2
    What are you for a user? All of your questions got answered within the 3 minutes by always the same user. That is really weird. – sra Feb 06 '13 at 09:55

2 Answers2

22

try this :

var dateObj = Ext.ComponentQuery.query('[name=date]');
Engineer
  • 5,911
  • 4
  • 31
  • 58
17

The name property is normally used by fields and there is a much better way to fetch them as the ComponentQuery. So if this is about fields I strongly recommend you to use findField() instead of a ComponentQuery. You can use it like

formInstance.getForm().findField('NameOrId');
sra
  • 23,820
  • 7
  • 55
  • 89
  • In handler for a button that is inside a panel: `var form = this.up('panel').getForm();` and then `form.findField('some-name');` – Nux Apr 08 '14 at 13:27