Forcing a calendar to show next month only

santhoshkumar budhihal asked on January 24, 2017 16:24

Hi ,

Below is the calendar I want to create in kentico, I would like to have events displayed over the calendar with image on that date with a hyperlink also, I think I can write a transformation in the calendar web part, right ?

My question is how do we achieve the look of the calendar, say skin, where should we create our own skin ? can you give an example ? there aren’t enough details on internet.

Also, how to achieve the two months being shown in the same page ? one top and one more bottom, one should be showing January other say next month feb, should we use two different calendar web parts here ? idea is to show the present month on the top and below one more calendar showing the next month events. There should be no next and prev buttons on both the calendars. How do we do that ?

PS: We are trying to achieve most of the things in portal engine so please guide us on the same, not on custom code.

Correct Answer

Zoltán Jalsovszky answered on January 25, 2017 10:50

If you cannot or don't want to create a custom web part, you can also achieve this by using a custom layout for the Calendar web part, where you override the default properties of the CMSCalendar control. For example, to hide the Next / Previous buttons and show the next month by default:

Image Text

2 votesVote for this answer Unmark Correct answer

Recent Answers

Brenden Kehren answered on January 24, 2017 16:47

Your best bet is to clone that calendar webpart and add another property for the starting month. Maybe your options are in a dropdown and you have:

  • 0;Current month
  • 1;+1 month
  • 2;+2 months
  • 3;+3 months etc, etc, etc.

This way you can set the starting date for that webpart when it loads. I know you don't want to do much custom code but this is a very simple 10 line update to a webpart which will be reusable within portal mode.

Regarding the styling, check out this post for skins:

1 votesVote for this answer Mark as a Correct answer

santhoshkumar budhihal answered on January 25, 2017 08:43

So what you mean to say is, we must create a custom web part ?

How are you going to set the property of the calendar to start from particular month ? what is that property called ?

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on January 25, 2017 14:54

Good call Zoltán, I forgot all about using the layouts. Only down side of the layout is they are pretty hidden and typically the last thing I look at when troubleshooting something like this. Nonetheless, they are good to use.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.