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

Need help with calendar

1 Answer 51 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Anoop
Top achievements
Rank 1
Anoop asked on 11 Jun 2013, 02:01 PM
I am working on an Ektron webcalendar which is built onTelerik. I am using the selected date property to set the focus to a specific month on my calendar. After this is set the previous or next button on the top left corner will only work for the latest 2 months.
for ex - If I set the focus to July, then the prev or next button will only allow me to see June and August.
Any help is greatly appreciated.

if (focuDate != DateTime.MinValue)
        {
            Telerik.Web.UI.RadScheduler scheduler = (Telerik.Web.UI.RadScheduler)WebCalendar1.Controls[0];
            scheduler.SelectedDate = focuDate;
        }

1 Answer, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 14 Jun 2013, 01:02 PM
Hello,

You can control the RadScheduler behavior when user clicks on the next/previous button using the following approach: in the NavigationCommmand server-side event handler to stop the default functionality and then change the RadScheduler selected date to the desired value.
//markup code
<telerik:RadScheduler ID="RadScheduler1" runat="server" OnNavigationCommand="RadScheduler1_NavigationCommand">
</telerik:RadScheduler>
//code behind
protected void RadScheduler1_NavigationCommand(object sender, SchedulerNavigationCommandEventArgs e)
    {
        e.Cancel = true;
        //here goes your custom logic for RadScheduler.SelectedDate
    }

Regards,
Boyan Dimitrov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Calendar
Asked by
Anoop
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Share this question
or