View Full Version : Select listener not fired on disabled dates from DatePricker

21 Nov 2012, 3:33 AM

I am new to Ext JS. I would like to popup an alert box on disabled date selection by user on date calendar. The select event get fired on enabled dates but not on disabled dates. Here is code snippet, Please advice.

Here on today's date the select event get fired but not on previous/future dates since i have set the date range. My requirement is would like to get an alert box for previous/future date even though they are disabled.

Please Advice.

Ext.create('Ext.panel.Panel', {
title: 'Choose a future date:',
width: 200,
bodyPadding: 10,
renderTo: Ext.getBody(),
items: [{
xtype: 'datepicker',
minDate: new Date(),
maxDate: new Date(),
'select':function(abc, date, eOpts){
Ext.Msg.alert('', date);


23 Nov 2012, 7:24 AM
If it's a disabled date, it should be selectable.