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

[Solved] How to get Month

5 Answers 138 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
chris wertman
Top achievements
Rank 1
chris wertman asked on 15 Oct 2007, 04:40 PM
How do I get the current monyth of the Scheduler ?

5 Answers, 1 is accepted

Sort by
0
jeremy
Top achievements
Rank 1
answered on 15 Oct 2007, 05:49 PM
You can gain access to the Month of the DateTime object by:

RadScheduler1.SelectedDate.Month

Good luck,
Jeremy

0
jeremy
Top achievements
Rank 1
answered on 15 Oct 2007, 05:49 PM
You can gain access to the Month of the DateTime object by:

RadScheduler1.SelectedDate.Month

Good luck,
Jeremy

0
chris wertman
Top achievements
Rank 1
answered on 15 Oct 2007, 07:08 PM
Hmmmmm,


Ok here is the problem, I am using the Ajax Manager on the sample provided Black Pearl, NOW I have 22 calendars for naivigation, I used the standard asp.net one for the left panel, and when the month changes it selects the correct month and the first day of the month in the scheduler. and the small calendar will change hte month on the Scheduler, I CANNOT get it working vice versa, i.e when I navigate on the scheduler the other calenedar stays the same month.

I need it to work BOTH ways.

I tried your code and it dosent fly.....???

It does ona normal page (gives me the month)

But not in the case of 2 calendars.

Chris
0
chris wertman
Top achievements
Rank 1
answered on 15 Oct 2007, 07:08 PM
Hmmmmm,


Ok here is the problem, I am using the Ajax Manager on the sample provided Black Pearl, NOW I have 22 calendars for naivigation, I used the standard asp.net one for the left panel, and when the month changes it selects the correct month and the first day of the month in the scheduler. and the small calendar will change hte month on the Scheduler, I CANNOT get it working vice versa, i.e when I navigate on the scheduler the other calenedar stays the same month.

I need it to work BOTH ways.

I tried your code and it dosent fly.....???

It does ona normal page (gives me the month)

But not in the case of 2 calendars.

Chris
0
Peter
Telerik team
answered on 16 Oct 2007, 02:30 PM
Hi Cris,

This is a good functionality. We will consider modifying the Black Pearl online example accordingly. Meanwhile, here is the solution:

Set RadAjaxManager so that RadSchduler updates RadCalendar:

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxSettingCreating="RadAjaxManager1_AjaxSettingCreating">  
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="PropertiesPanel">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="SelectedProperty" /> 
                        <telerik:AjaxUpdatedControl ControlID="PropertiesPanel" /> 
                        <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                <telerik:AjaxSetting AjaxControlID="RadScheduler1">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="SelectedProperty" /> 
                        <telerik:AjaxUpdatedControl ControlID="RadCalendar1" /> 
                        <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                        <telerik:AjaxUpdatedControl ControlID="Label1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 

Also, use RadScheduler's NavigationComplete event to synchronize the two controls:

 protected void RadScheduler1_NavigationComplete(object sender, SchedulerNavigationCompleteEventArgs e)  
        {  
            RadCalendar1.SelectedDate = RadScheduler1.SelectedDate;  
            RadCalendar1.FocusedDate = RadScheduler1.SelectedDate;              
        } 

Feel free to contact us if you have further questions.


Greetings,
Peter
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Scheduler
Asked by
chris wertman
Top achievements
Rank 1
Answers by
jeremy
Top achievements
Rank 1
chris wertman
Top achievements
Rank 1
Peter
Telerik team
Share this question
or