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

Clicking the All Day row in Scheduler indicator?

3 Answers 77 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
vincent
Top achievements
Rank 1
vincent asked on 21 Oct 2009, 12:46 AM
I have a custom form to add appointments.  When I click on the Scheduler's All day row, I need some type of flag to know that the user clicked this row so I can create an All Day appointment.  What indicates this?

Thanks.

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 21 Oct 2009, 11:00 AM
Hi Vincent,

You can check whether the appointment is created for all day by inspecting the args.get_isAllDay() in OnClientAppointmentInserting event of RadScheduler.

JavaScript:
 
<script type="text/javascript"
    function OnClientAppointmentInserting(sender, args) { 
        var isAllDay = args.get_isAllDay(); 
        alert(isAllDay); 
    } 
</script> 

Feel free to share the comments,
Shinu.
0
JSCmt
Top achievements
Rank 1
answered on 25 Mar 2010, 08:40 PM
I apologize if this message is misplaced in this forum item, but it seems related.  I further apologize if this already exists somewhere in the Forums, and I failed to find it.

I am trying to send the user to an external page to create a new appointment (writing to a custom data source with its own idiosyncratic design...i.e., I cannot use Telerik's own Add/Edit appointment setup) using the OnClientTimeSlotClick client-side event and using the eventArgs.get_Time() function to send the selected time along to the other page.

So far, it is working wonderfully, except for one logical issue.

The documentation I downloaded indicated that "This event is not raised if the user clicks on the all-day row."  However, the event is raised when I click on the All Day row.

So now I have a problem.  Whether the user (in day view) clicks on the midnight time slot or on the all day slot, the time string that is passed along is exactly the same.  Furthermore, this particular event has no method like get_isAllDay() that I can find.

The practical downside is minimal, since I do not anticipate too many midnight-hour appointments being created, but I wanted to raise this issue for two reasons:

(1) Your software is behaving in a way that contradicts your documentation, something about which I assume you would want to know.
(2) I'd rather not have a known quirk/bug/issue (however minor) left unaddressed in my code.

Thank you for your help.  I have enjoyed working with your software; it is a wonderful package.
0
Peter
Telerik team
answered on 29 Mar 2010, 02:22 PM
Hi JSCmt,

Thank you for your feedback. I just checked the online documentation and it seems fine. I will investigate why there is discrepancy with the downloadable version of the help.

As for your question, you can use the following check when handling OnClientTimeSlotClick:
function OnClientTimeSlotClick(sender, eventArgs) {
           if (eventArgs.get_targetSlot().get_isAllDay())
               alert("all-day row was clicked");
           else
               alert(eventArgs.get_time());            
       }


Greetings,
Peter
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Scheduler
Asked by
vincent
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
JSCmt
Top achievements
Rank 1
Peter
Telerik team
Share this question
or