This is a migrated thread and some comments may be shown as answers.

Customize the default months shown?

2 Answers 73 Views
MultiViewCalendar
This is a migrated thread and some comments may be shown as answers.
Brian Vallelunga
Top achievements
Rank 1
Brian Vallelunga asked on 03 Dec 2019, 05:06 PM
The default state of the multi-view calendar is to pop up with the current month and next month shown by default. For our needs, it would be better to show the previous month and current month by default. Is there a way to accomplish this?

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimiter Topalov
Telerik team
answered on 05 Dec 2019, 08:26 AM

Hello Brian,

The most straight-forward approach would be to set the focusedDate to a value in the previous month, e.g.:

https://stackblitz.com/edit/angular-7aepxo?file=app/app.component.ts

A more generic approach would be to set it to a date, calculated as the first of the previous month based on a new Date() (today), e.g.:

https://stackblitz.com/edit/angular-7aepxo-zbu7pw?file=app/app.component.ts

I hope this helps.

Regards,
Dimiter Topalov
Progress Telerik

Get quickly onboarded and successful with your Telerik and Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Brian Vallelunga
Top achievements
Rank 1
answered on 19 Dec 2019, 01:19 AM
Thanks, that was very helpful.
Tags
MultiViewCalendar
Asked by
Brian Vallelunga
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Brian Vallelunga
Top achievements
Rank 1
Share this question
or