View Full Version : Click event for DatePicker is only working for calender icon but not for textbox

5 Nov 2012, 2:21 AM
Hi All,

I used following code to add a datefield. Datefield comes with a text box and a calender icon by default.
Below Code is adding 'click' event on top of calender icon (shown in the red cricle) but not over the text box (shown in yellow background).


Ext.define('MyDate', {
extend: 'Ext.form.field.Date',

onTriggerClick: function(){
Ext.create('Ext.window.Window', {
title: 'I am a window',
width: 200,
height: 200,
autoShow: true
new MyDate({
renderTo: document.body

5 Nov 2012, 2:52 AM
Try to override 'expand' method (inherited from Picker).
Also, by default, field is editable, that's why clicking on input will only bring focus to it.

5 Nov 2012, 2:53 AM
Try to set editable config of your datefield to false.