JavaScript
Run Code
Open in Fiddle
Ext.application({ name : 'Fiddle', launch : function() { Ext.create('Ext.Component', { html: 'Ext JS version: ' + Ext.versions.extjs.version + '<br />Selecting a same value for the date field triggers ' + 'the \'select\' event even though it shouldn\'t.<br/>' + 'Also reproducible selecting dates from the picker.', renderTo: Ext.getBody() }); Ext.create('Ext.form.field.Date', { renderTo: Ext.getBody(), id: 'df1', listeners: { select: function(item, date) { Ext.toast('Select event triggered.'); } } }); Ext.create('Ext.button.Button', { text: 'test val 1', handler: function() { Ext.getCmp('df1').setValue('08/01/2019'); }, renderTo: Ext.getBody() }); Ext.create('Ext.button.Button', { text: 'test val 2', handler: function() { Ext.getCmp('df1').setValue('08/02/2019'); }, renderTo: Ext.getBody() }); Ext.create('Ext.button.Button', { text: 'fix', handler: function() { this.disable(); Ext.define('gh1673', { override: 'Ext.form.field.Date', didValueChange: function (newVal, oldVal) { var me = this; if (newVal instanceof Date && !(oldVal instanceof Date)) { oldVal = me.parseDate(oldVal); } else if (!(newVal instanceof Date) && oldVal instanceof Date) { newVal = me.parseDate(newVal); } return !me.isEqual(newVal, oldVal); } }); Ext.toast('Fix for date field select event is in effect.'); }, renderTo: Ext.getBody() }); } });