PDA

View Full Version : Calendar in read only mode



reiben
30 Nov 2010, 1:21 AM
is there a way to run calendar in non editing mode? User can only view events, click to see details, but he can't move them, add them etc...
What I want to achieve is to make user able to click on the event to check details, but I don't want user to drag events and select range on the calendar. Is this possible?

Also: can I use calendar control to plan a week activities that occurs every week (like a school lesson plan when I have math each monday at 8 a.m)? What I mean is to use a calendar in non date mode - I'm only interested that Friday is Friday, not Friday 26th of November.
In other words, I don't need to navigate through weeks and I don't mind actual date.

reiben
1 Dec 2010, 2:31 AM
any help?

rbastic
2 Dec 2010, 10:46 AM
For disabling drag events+select range do this:
1) Set enableDD: false in your CalendarView.js file

2) ... Then to disable 'add events' find test-app.js and search for 'dayclick', it would look like this:


'dayclick': {
fn: function(vw, dt, ad, el) {
this.showEditWindow({
StartDate: dt,
IsAllDay: ad
}, el);
this.clearMsg();
},
scope: this
},


Comment out the call to showEditWindow() and you're good to go.

reiben
3 Dec 2010, 1:03 AM
thanks for disabling DD, works like a charm.

what about this non-date mode?