I am using Calendar Control and in month view mode it currently shows
previous month's last week dates and next months first week dates as well.
Is it possible to show only dates for current month .?
Please let me know how we could achieve it.
Thanks,
Avinash
3 Answers, 1 is accepted
0
Yana
Telerik team
answered on 01 May 2019, 10:46 AM
Hello Avinash,
You can hide the dates from the previous and last months through a CalendarDelegate and UpdateVisualsForCell method, however, keep in mind that this will not affect the calculations that the calendar does to position its cells and it will still display 6 rows.
Here is a quick snippet:
public class CustomCalendarDelegate : CalendarDelegate
{
public override void UpdateVisualsForCell(TKCalendar calendar, TKCalendarCell cell)
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items
Is it possible to reduce the number of rows in order to show current months dates only?
0
Yana
Telerik team
answered on 12 Jun 2019, 11:32 AM
Hi Avinash,
I am afraid the count of the rows cannot be changed. You'd need to have 6 rows to ensure there will be enough room for all the dates of each month ( for example, if 1st is the last day of the week, 30th will be placed on the 6th row).
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items