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

change the years you are able to see in the MonthYearFastNavigation

2 Answers 20 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Lex
Top achievements
Rank 1
Lex asked on 06 Jun 2014, 08:19 AM
We limit the selection of dates to the last 5 years, however by default the MonthYearFastNavigation shows the last 4 years, current year and the next 5 years. I was wondering if the user is able to change is so that dates that are not selectable won't show up either and that the user can see all the years that they can select from.

For the current year the user can see the years 2010 to 2019. But what we really want to show is 2009 to 2014 because those are the only years that the user can select dates from.

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 06 Jun 2014, 11:57 AM
Hi Lex,

Please have a look into the sample code snippet which showing the only the current year and next 5 years in MonthYearFastNavigation.

ASPX:
<telerik:RadCalendar ID="RadCalendar1" runat="server">
</telerik:RadCalendar>

C#:
protected void Page_Load(object sender, EventArgs e)
{
    DateTime now = DateTime.Now;
    RadCalendar1.RangeMinDate = now;
    RadCalendar1.RangeMaxDate = now.AddYears(5);
}

CSS:
.rcDisabled
{
    visibility: hidden !important;
}

Let me know if you have any concern.
Thanks,
Princy.
0
Lex
Top achievements
Rank 1
answered on 06 Jun 2014, 12:25 PM
Hi Princy,

That is not exactly what I was looking for.

What I want to do is to only show the range of dates that you can select on one page.

Currently the start year 2009 is on the previous page, what I want to do is show 2009 to 2014 on 1 page.
Tags
Calendar
Asked by
Lex
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Lex
Top achievements
Rank 1
Share this question
or