I would like Feedback on design for calendar view

Dear all,
At the moment within any frappe app, a doctype with some date/datetime input fields can be used to create a calendar view with the _calendar.js add on the doctype file name.

In an organization like a school, it can create a lots of different calendars (one for course schedule, one for your todo/tasks, one for your meetings, one for your assessments, one for your staff/holiday calendar, etc.) This is of course extremely impractical from a user perspective. All these events should be able to be viewed within ONE calendar.

So here is my question(s):
From a design perspective (think here in terms of efficiency on the system / server) should I programmatically create an Event for each of these different doctypes (so everything is readable under one calendar view) ?
Or, and I am not sure if it is possible, should I create sql queries from these different doctypes and return the results to a calendar view doctype. In this case, just reading different doctype from the db and returning the results to one _calendar.js view.

What do you think would be the best way to approach that?

Thanks for your ideas / feedback.

I agree it is very impractical from the users point of view… and am surprised that you did not get any support from the community…unfortunately I am not in a position to support one solution over the other.

Did you try either?


Actually you can do it, calendar view can use “own” doctype as events source or call custom method.

Check this:

Hope this helps.

Hello avc,
I tried this, it does not help. The event shows up as a whole day event and not as an event at the right time of the day :frowning:
Some more work is required I suppose…

Hi @remoteresources:

An event will shows up as a whole day if "allDay": "allDay" is defined in field_map … try with "allDay": 0 instead.

Anyway, I don’t know what is your use case. Could you ellaborate it a little bit?