PDA

View Full Version : getting trigger by reference in datefield



Shawazi
12 Jun 2009, 2:02 PM
I know I can set DateField component id with id. Is there a way to set the id of the trigger? I know you can do the same for a TriggerField independently but can't find it within the DateField. Something like triggerId instead of triggerClass

Shawazi
12 Jun 2009, 2:13 PM
I used date_field_cmp.trigger.dom to get the trigger, but would still like to set id if possible :)

euchiyama
12 Jun 2009, 2:57 PM
According to the 3.0 documentation, DateField has:

triggerConfig (http://extjs.com/forum/../deploy/ext-3.0-rc1.1/docs/source/TriggerField.html#cfg-Ext.form.TriggerField-triggerConfig) : MixedA DomHelper config object specifying the structure of the trigger element for this Field. (Optional).

A DomHelper (http://extjs.com/forum/../deploy/ext-3.0-rc1.1/docs/output/Ext.DomHelper.html) config object specifying the structure of the trigger element for this Field. (Optional).
Specify this when you need a customized element to act as the trigger button for a TriggerField.
Note that when using this option, it is the developer's responsibility to ensure correct sizing, positioning and appearance of the trigger. Defaults to:

{tag: "img", src: Ext.BLANK_IMAGE_URL, cls: "x-form-trigger " + this.triggerClass}It doesn't show up in the 2.2.1 Docs...not sure if it exists there.

Animal
12 Jun 2009, 11:37 PM
@OP, what are you wanting to acheieve?