Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
395
how to disable the appointment dialog for appointment days and week ends
posted

i have one situation.i add all hotel booking  appointmetns to webmonthview.when user clicking on the particular day.i want to open the appointment dialog(not for holidays and not for schedule days).i got solution almost but when user click on the white box(in figure) in the schedule days appointment dialog is opening.

there should be only one appoinment for a day.user click on white box(in figure) not have to display dialog because already one appoiontment in that day

 

my code snippet and diagram shown.......

 

function OpenCalendarEvent(oScheduleInfo, oEvent, oDialog, oActivity)
 {

var da= oActivity.getStartDateTime().toString();

if(da.substring(0,3)=='Sat' || da.substring(0,3)=='Sun')
{
//canceled  the appointment dialog for week ends
oEvent.cancel = true;
}
else if(oActivity.getDataKey()==null)
{
   Event.cancel = false;
}
else
{
//canceled  the appointment dialog for scheduled
oEvent.cancel = true;
}
}

 please suggest me any approach for getting that requirement.

 

 

 

Parents
No Data
Reply
  • 40030
    Offline posted

    Hello,

     I'm not 100% sure what youre asking for, so if i'm incorrect in my assumption, i apologize.

    However, i think you're trying to detect if the dialog is opening for a day that already has an activity. And if it does, you want to cancel the dialog. Is this correct?

    If so, you should be able to achieve it by using the following:

    var appts = oScheduleInfo.getActitivites();

    for(var i = 0; i < appts.length; i++)

    {

         // Compare appts[i].getStartDateTime()  with oActivity.getStartDateTime()

        // Note: they won't be exactly the same, so you'll need to check that the day and month both match up.

    }

     Hope this helps,

     -SteveZ

Children