More in this section

RadCalender

2 posts, 0 answered
  1. Smitha
    Smitha avatar
    22 posts
    Registered:
    29 Oct 2008
    11 Nov 2008
    Link to this post
    Hi!

    I have added the RadCalender to one of my user controls and added the user control to my page.

    I would like to add some events to my Rad calender when i click on a particular date.

    How do I activate the date click event ?
    I think I need to use the RadScheduler am I right? If yes can you direct me on how to do this.

    Regards,
    Smitha.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    13 Nov 2008
    Link to this post
    Hello Smitha,

    Please take a look at the following forum thread Events Scheduler View where we attached the current implementation of Sitefinity EventsSchedulerView control and some examples regarding the same question. As for the RadCalendar, it is a different control. Check out the following article RadCalendar Overview. I think that you need to use EventsSchedulerView control, however OnDateClick event is supported by RadCalendar control.

    Here is a sample:

    <script type="text/javascript"
     function confirmDataClick(sender, eventArgs) 
     { 
       var day = eventArgs.get_renderDay(); 
       if (day.get_isSelectable()) 
       { 
         var date = day.get_date(); 
         var dfi = sender.DateTimeFormatInfo; 
         var formattedDate = dfi.FormatDate(day.get_date(), dfi.ShortDatePattern); 
         var confirmDataClick = confirm("Are you sure you want to " + 
           (day.get_isSelected() ? "unselect " : "select ") + formattedDate + "?"); 
         eventArgs.set_cancel(!confirmDataClick); 
       } 
     } 
    </script> 

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
2 posts, 0 answered