Implement DocType Calendar View into custom page

I would like to implement the calendar view of DocType Event into a page. Something like this:

Is this possible? If yes, can anyone lead me into a direction?

With Frappe framework and ERPNext, your only limit is your imagination. So yeah, anything’s possible. hope that this development is out of a necessity. Probably best to start with developer docs

Thanks. The documentation is great, but does not help in that regard. Looking into the page Page API it only covers some rudimentary elements of the page object. Integrating a view of a DocType is not explained, if it is possible as you said.

Currently I have added a new custom page. The .js and .json are created automatically. I have added a .html template which I have rudimentary filled with a colum/grid layout.

image

In the .js file looks like this:

frappe.pages['dashboard'].on_page_load = function(wrapper) {
	var page = frappe.ui.make_app_page({
		parent: wrapper,
		title: 'Dashboard',
		single_column: true
    });
 
    page.main.html(frappe.render_template("dashboard", {}));
    // $('#calendar').load('desk#List/Event/Calendar/Default');
}

This is how the grid thing can be solved. However, in the #calendar div the event calendar view should be implemented. I have yet not clue how to do that.

Please lead me to a source that shows how to do it. I am more than willing to share my code and development with the community.

Much appreciated.

1 Like

So, any hints where to start?

So, I have tried to implement another instance of FullCalendar on my custom page. However, there are some conflicts when navigating to another view that has a FullCalendar implementation as well, for instance navigate from the custom page to events calendar view.

The calendar view will be bugged. In can be solved through a browser refresh (F5). I still would prefer to actual implement the events calendar view on my page.

Still dunno if that is possible.

Any progress on how to do this?

This is a very useful thing to be able to do. I wish there was more documentation or tutorials on how to utilise frappe components such calendar and list view within Page UI.

1 Like