Skip to main content

Is there a way to change the visible week on the Calendar Component using Javascript?


Basically, I have a Page Title with “Previous” and “Next”, and I’d like to use these buttons much like the default week-to-week navigation - but with the added potential of using the Action Framework too.


Is there a js function that I can use to change what week the Calendar Component displays?

Hi Roman, suspect this is too late for you, but for posterity’s sake…

The datepicker in the calendar uses jQuery UI’s datepicker - so you should be able to do something like:



var datepicker = $(".hasDatepicker");  datepicker.datepicker("option", "setDate", new Date(2016, 5, 3));

Or something to that effect. You could also do it the other way around - attach a listener to changes to the date in the datepicker and then run your own Javascript (which could in turn call your snippets).


Hi Gary, yes this is in fact the approach that we ended up using - and it works quite well.

Thanks for responding to my original question so that others can see the solution. (I had forgotten that i even posted this haha!)


Reply