Ext version tested: 6.6.0.258

Framework:
modern

Browser versions tested against:
  • Google Chrome Version 76.0.3809.132 (64-Bit)


Description:


NB: sorry in advance, I can't copy/paste my code because it's located on a computer without access to Internet. I have to retype everything, so I will give the minimum code I can give to explain y problem....

For the needs of my application, I need to open a date picker when a user selects a specific value in a combobox, and get the value when he picks it.
(That's why I don't use a datepickerfield.)

So far, my code is very simple :
in my controller, I instantiate a new date picker this way :

Code:
var datePicker = Ext.create('Ext.picker.date',
{
value = myValue
}); Ext.Viewport.add(datePicker); datePicker.show();
My problem is that, when the user clicks on the 'Done' button, I get an error :
the onDoneButtonTap function of the component is called, and it searchs the ownerField... that doesn't exist since the date picker is not linked to a date picker field !

I tried to add a lot of different listeners, like this :
Code:
var datePicker = Ext.create('Ext.picker.date',
{
value = myValue, listeners: {
change: {
fn: function(me, date, eOpts) {
console.log('on change');
}
}, click : ... select: ... tap: ...
}
} }); Ext.Viewport.add(datePicker); datePicker.show();
None of this works : I never get a trace.

I tried to redefine to doneButton :
HTML Code:
doneButton: {xtype: 'button',
text: 'Test',
handler: function() {console.log('click');}}
I get the trace... but the onDoneButtonTap function is still called in the same time, so I get an error anyway !



So, how can I fix ?

I insist on this : it's in the modern framework. I the classic one, the date picker seems to work differently.



Thanks for your help.