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

getting the month from a scheduler

1 Answer 60 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 10 May 2010, 12:31 PM

 

In a RadScheduler how do I get the month of the appointment from the following code and how do I set the default month for the scheduler during page load (code behind)?

 

function onAppointmentClick(sender, eventArgs)

{

window.location.href = "Events.aspx?event=" + eventArgs.get_appointment().get_id();

}

 

Thanks

Robert

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 10 May 2010, 01:18 PM

Hello Robert,

The following code will help you in getting the month in the onAppointmentClick event handler.

JavaScript:

 
<script type="text/javascript">  
    function onAppointmentClick(sender, eventArgs) {  
        alert(eventArgs.get_appointment().get_start().format("MMM")); // Alerts the month  
        window.location.href = "Default.aspx?event=" + eventArgs.get_appointment().get_id(); // Redirect  
    }  
</script> 

And the following code snippet shows how to set the default month in RadScheduler.

CS:

 
    protected void Page_Load(object sender, EventArgs e)  
    {  
        DateTime dt = new DateTime(2010,01,01);  
        RadScheduler1.SelectedDate = dt;  
    } 

-Shinu.

Tags
Scheduler
Asked by
Mark
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or