How can add eventClick
listeners on Calendar Week
and day
views. I have added listener on Month
view and its working fine but i have no events on Week and Day Views. Is there a way that i can add events to those views as well. Or any work around.
I don't want to include whole extension
for that either.
xtype: 'panel',
title: 'Calendar',
layout: 'fit',
width: 1200,
height: 600,
items: [{
xtype: 'calendar',
views: {
day: {
addForm: null,
editForm: null,
listeners: {
eventtap: 'onEventClick' //this doesn't work
}
},
week: {
addForm: null,
editForm: null,
listeners: {
eventtap: 'onEventClick' //this doesn't work
}
},
month: {
addForm: null,
editForm: null,
listeners: {
eventtap: 'onEventClick' // this works
}
}
},
bind: {
store: '{calendars}'
}
}]
The default Add and Edit form are working but i want to open my own window on event click to show just the details about the event. Not the window editable or addable windows that is the detault.
Is there a work around for adding event click
for Week
and Day
view just like Month view
?
There was a bug/issue in the source code of ExtJs Calendar package. Go to
ext/packages/calendar/src/calendar/view/days.js
at line 1436
change function onEventTap
with this code:
onEventTap: function(e) {
var event = this.getEvent(e);
this.fireEvent('eventtap', this, {
event: event
});
this.showEditForm(event);
},