PDA

View Full Version : Disable month if dates of this month are disabled in extjs4.1 using Ext.form.DateFiel



lasy
8 Jan 2013, 9:40 PM
Hi ,
I am using Ext.form.DateField i am disabling the dates on a particular condition .
I need to disable means user can nt select the month or disable the month if the all of the dates of the month is disabled .Below is my code i am using .

dateFieldForSavedPlanFrom = new Ext.form.DateField({
format:"m/d/Y",
disabledDates:["^(?!"+dateArray.join("|")+").*$"],
name: 'fromPlan',
fieldLabel: 'From',
id: 'fromdatePlanId',
disabledDatesText:"Date not available.",
listeners: {
focus:function(objTextfield){
if(objTextfield.isExpanded === undefined || objTextfield.isExpanded === false)
{
objTextfield.expand();
}

}
}

});




{
xtype: dateFieldForSavedPlanFrom,

},

mitchellsimoens
11 Jan 2013, 8:20 AM
So you want to disable all days in a given month or the month from the month drop down?

lasy
13 Jan 2013, 8:12 PM
Hello

I am able to disable all the days of the month .
I need to diable the month if all the days of the month is disable.
The user can not click the month .