Past or future days not rendering using refDate options

Dear Support,

I’m using mobiscroll (version 5.24.1) timeline view with following calendar options.
calendarOptions

I wanted to display past or future dates in the timeline view. As per the documentation it’s possible by using refDate property of calendar options (Responsive event calendar documentation for Angular | Mobiscroll).

As soon as I pass first date of past month with the size of 30 or 31 it’s not working properly the calendar is not displaying the timeline view according to the date given.

It seems if the current date is not falling between the refDate and size property the calendar is not displaying properly.

Looking forward for the suggestion.

Thanks
Rohit

Hi @rohit.rai :wave:

The refDate is not so straight forward to understand, but I’ll try to explain.

The timeline view works like a grid, with paging. For example, if the size is specified to be 31, which means when you navigate with the next or previous buttons from the header, another page is rendered with the next 31 days.

The refDate specifies only the reference date from where these “pages” are calculated.

In the case of the timeline and scheduler, this defaults to today. But, this is only the reference, the first page that is shown is always the page which contains the selectedDate . So if you want to change the currently rendered “page”, you should pass the selectedDate option instead of the refDate .

1 Like

Thanks @Zsombor for the reply

1 Like