Replace year/month picker with date picker on event calendar

Currently the event calendar has a year/month picker in the top left corner. Is it possible for this to be a date picker so that you can pick a specific date, rather than only a month, at least when the view type is set to day?

Hi @Vincent_Wansink :wave:

Absolutely, this is already implemented in case of the Scheduler, like in this example: Scheduler Custom range view Example | Mobiscroll - the solution would be the same for the Event Calendar as well, you just need to implement a date picker in the header based on the code of the example I shared.

Thanks for that demo, but I’m struggling to mimic it. I’m trying to implement it on my event calendar, but I’m running into a javascript error on the following:

myRange.setVal([startDate, endDate])

Specifically setVal. This function doesn’t seem to exist, so what am I missing?

Hi @Vincent_Wansink,

The setVal method does exist for the datepicker component.
Could you please share more details about the difficulty? You are also welcome to share the relevant code.

Hm… I bet this is related to the problem I’m having with the date picker not hiding when I click outside of it. It sounds like some JavaScript is failing to load at some point. Let me see if I can isolate this issue some more.