- How to add view more link in week view that directs to day view on clicking
- How to add count of events in week view for every day
Hello @Sravan_Kumar ,
Regarding this question:
How to add view more link in week view that directs to day view on clicking
You can do it with the dhtmlxscheduler_active_links.js
extension:
https://docs.dhtmlx.com/scheduler/month_view.html#presentingdaysnumbersasclickablelinks
Here is a demo(open week view and click on the label):
https://docs.dhtmlx.com/scheduler/samples/03_extensions/06_links_plugin.html
Regarding this question:
How to add count of events in week view for every day
You can get a number of events for some date with the getEvents
method:
https://docs.dhtmlx.com/scheduler/api__scheduler_getevents.html
I don’t know where you want to display the number of events, but you can use the markedTimespan with “HTML” parameter:
https://docs.dhtmlx.com/scheduler/api__scheduler_addmarkedtimespan.html#html
Or display it in day labels, with following code:
var format = scheduler.date.date_to_str(scheduler.config.day_date);
scheduler.templates.week_scale_date = function(date){
var evs = scheduler.getEvents(new Date(date), scheduler.date.add(date, 1, "day"));
return `${format(date)}/evs: ${evs.length}`;
};