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

[Solved] Scheduler

1 Answer 93 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
nagesh Mynedi
Top achievements
Rank 1
nagesh Mynedi asked on 22 Oct 2009, 12:01 PM
How can i block Every last tuesday in Every Month..

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 22 Oct 2009, 02:04 PM
Hi Nagesh,

I guess you want to prevent inserting appointment on last Tuesday of month. If so one suggestion would be attaching the 'OnClientAppointmentInserting' event cancel the event based on condition.

JavaScript:
 
<script type="text/javascript"
    function OnClientAppointmentInserting(sender, args) { 
        var dt = new Date(); 
        dt = args.get_startTime(); 
        var weekNum = dt.getDay(); 
        // Now Check for whether the date is last tuesday of month 
        if (condition) { 
            args.set_cancel(true); // Cancel the event 
            alert("Cannot insert"); 
        } 
    } 
</script> 

Thanks,
Princy.
Tags
Scheduler
Asked by
nagesh Mynedi
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or