Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to reference "Done" button in Sencha Touch datepickerfield
    primarykey
    data
    text
    <p>I need to fire an event when the user selects a date from the datepickerfield component (when they tap the built in "Done" button). I tried to make reference to the 'action' of the button, among other things, but no luck.</p> <p>Any info on how to create a ref (or handler or listener) from the datepickerfield "Done" button would be greatly appreciated.</p> <p>Below is part of my View:</p> <pre><code> items:[{ xtype: 'button', align: 'right', text: 'Mark all present', action: 'markAllPresent' }, { xtype: 'datepickerfield', cls: 'pickAdate', align: 'left', label: 'Date', name: 'date', value: new Date(), picker : { yearFrom: 2012, toolbar : { items : [ { xtype: 'button', ui: 'confirm', text: 'Today', align: 'right', handler: function(button, event) { var picker = button.up('datepicker'); picker.fireEvent('change', picker, Ext.DateExtras.clearTime(new Date())); //Today button , clear date } } ] } }, doneButton:{ action: 'dateDone' //THIS DOES NOTHING ---------============== }, listeners: { change: function(picker, date) { console.log(date); var store = Ext.create('Ext.data.Store', { model: 'App.model.NewDateModel', id:'DateStore' }); store.add(date); store.setData(date); store.sync(); this.fireEvent("newDatePicked", this); // **DOES NOT FIRE EVENT IN MY CONTROLLER================ } } }] </code></pre> <p>And my controller:</p> <pre><code>config: { control: { doneButton: { newDatePicked: 'newDatePicked' } }, refs: { doneButton: 'button[action=dateDone]' } }, newDatePicked: function(list, record) { ..... } </code></pre> <p>Thanks</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload