I am trying to create a context menu on a single click. I have the code ready to implement this. However I am trying to find out the right object/events to use.
Lets say one day has an appointment set, and one day does not. What event can I use or what objects can I use through Javascript to see if the day that was just clicked on has an appointment set?
Here is the current event I am using, which works, but when I click on an appointment nothing fires.
function WebScheduleInfo1_ActiveDayChanging(oScheduleInfo, oEvent, oOldDate, oNewDate) { console.log(oScheduleInfo); console.log(oEvent); console.log(oOldDate); console.log(oNewDate);
}
Which object will hold the value of weather an appointment is set that day or not?
I can not get this method to work.
It only gets first element of the appointments. Could you please provide code for clicking on an appointment in the calender and getting the properties clientside? Or serverside for that matter.
Any one able to help on this issue?
Hello OmegaPrime,
We are currently researching this matter and will keep you posted of any available information.
Thank you for your patience.
I ran into another issue. You suggested earlier to use the MouseDown event of the WebMonthView. I was able to get this working, however when I click on the activity it self it does not think there is an activity.
Also when I click on a specific day, the block right above where an activity would be, the same block that lists the day. It does not recognize an activity for that day. Am I missing something that would have these instances verify if an activity is present?
var $bHasActivity = false;
function WebWebMonthView_MouseDown(oWebMonthView, oEvent, element) { if (element.children.length == 0) { $bHasActivity = false; } else { $bHasActivity = true; } }
It is returning false if I click on the activity itself or in the header section of the day that contains the day of the month information. Hope that makes sense!
Hi OmegaPrime,
It seems that it is not possible to get all this data client-side. You can get all activities in the Click event of WebMonthView:
var activities = arguments[0].getWebScheduleInfo().getActivities();
Also, you can get the selected activity, but this would only work if you click on the activity itself:
var selectedActivity = arguments[0].getSelectedActivity();
var startDateTime = arguments[0].getSelectedActivity().getStartDateTime();
var duration = arguments[0].getSelectedActivity().getStartDateTime();
Please let me know if you have any further questions.