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

Get appointment slot endtime on clientside

3 Answers 48 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Jonathan
Top achievements
Rank 1
Jonathan asked on 23 Jun 2008, 11:04 AM
Hi All

I can get the start time of a clicked appointment by using this 

contextMenuSlot.get_startTime();

but is there an endtime equivilent?

Cheers
Jon

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 23 Jun 2008, 04:59 PM
Hello Jonathan,

Please, try the following code sample:
 <script type="text/javascript">  
    function OnClientAppointmentClickHandler(sender, eventArgs)  
    {  
        var start = eventArgs.get_appointment().get_start();  
        var end = eventArgs.get_appointment().get_end();          
        alert(start);  
        alert(end);  
    }  
    function OnClientAppointmentContextMenu(sender, eventArgs)  
    {  
        var start = eventArgs.get_appointment().get_start();  
        var end = eventArgs.get_appointment().get_end();          
        alert(start);  
        alert(end);  
    }  
    </script> 



Kind regards,
Peter
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Jonathan
Top achievements
Rank 1
answered on 24 Jun 2008, 11:23 AM
Hi Peter

I should have explained that better, I'm doing this in a taskslotcontextmenuitem click event.

Jon
0
Peter
Telerik team
answered on 24 Jun 2008, 04:13 PM
Hi Jonathan,

Using the latest SP2, please try the following:

function OnClientTimeSlotContextMenuHandler(sender, eventArgs)  
    {  
      
        var startTime = new Date();  
        startTime = eventArgs.get_time()  
        //start time:  
        alert(startTime);  
          
        startTime.setMinutes(startTime.getMinutes()+ sender.get_minutesPerRow());  
        //end time:  
        alert(startTime);  
         
    } 


Kind regards,
Peter
the Telerik team

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