Hi there!
I've updated the stuff to fit my needs.
Maybe it comes handy to others.
PHP Code:
initComponent : function(){
Ext.ux.MultiMonthCalendar.superclass.initComponent.call(this);
this.value = this.value ? this.value.clearTime() : new Date().clearTime();
this.initDisabledDays();
this.noOfMonthPerRow = this.noOfMonthPerRow > this.noOfMonth ?this.noOfMonth : this.noOfMonthPerRow
this.addEvents({
'change':true
,'add':true
,'remove':true
})
PHP Code:
handleDateClick : function(e, t){
e.stopEvent();
var pn = t.parentNode;
if(t.dateValue && pn.className.indexOf("x-date-disabled")<0){
if ( (pn.className.indexOf("x-date-prevday")<0) && pn.className.indexOf("x-date-nextday")<0) {
if (pn.className.indexOf("x-date-selected")<0) {
pn.className += " x-date-selected";
var oldDates = this.eventDates;
this.addEventDate(t.dateValue);
var newDates = this.eventDates;
this.fireEvent('change',{
'method':'add',
'currentDate':t.dateValue,
'newDates':newDates,
'oldDates':oldDates
});
this.fireEvent('add',{
'currentDate':t.dateValue,
'newDates':newDates,
'oldDates':oldDates
});
} else {
pn.className = "x-date-active";
var oldDates = this.eventDates;
this.removeEventDate(t.dateValue);
var newDates = this.eventDates;
this.fireEvent('change',{
'method':'remove',
'currentDate':t.dateValue,
'newDates':newDates,
'oldDates':oldDates
});
this.fireEvent('remove',{
'currentDate':t.dateValue,
'newDates':newDates,
'oldDates':oldDates
});
}
}
}
},
usage:
PHP Code:
items: [{
xtype: 'mmcalendar',
value: new Date(2008, 0, 1),
noOfMonth : 3,
noOfMonthPerRow : 3,
eventDates : evtDate,
listeners: {
'change':{
fn:function(params){
//..whateva'
}
}
}
,'add':{
fn:function(params){
//..whateva'
}
}
}
,'remove':{
fn:function(params){
//..whateva'
}
}
}
}]