Hello Vamsipriya,
The solution to your problem is quite simple. All you need to do is tweak the myDayClickHandler function as per your needs. Below is the modified function that will not display the dialog form in case the day chosen is a Saturday or a Sunday. Please note that the text in
bold is what you need to do to satisfy your problem.....
function myDayClickHandler(eventObj){
//Note: 0 = Sunday, 1 = Monday, 2 = Tuesday, 3 = Wednesday, 4 = Thursday, 5 = Friday, 6 = Saturday
//Add the days that you want to disable in a semicolon separated string. Below variable will disable the form from showing on 0 and 6, i.e, on Sunday and Saturday.
var disableDays = "0;6"; //Add more days if required or remove the days
// Get the Date of the day that was clicked from the event object
var date = eventObj.data.calDayDate;
//alert("Date chosen is: " + date);
// store date in our global js variable for access later
clickDate = date.getFullYear() + "-" + (date.getMonth()+1) + "-" + date.getDate();
//Add the following check. This will validate if the day is not present in "disableDays" variable and will show the add event dialog. If it is present it will not display the add event dialog form
if(parseInt(disableDays.indexOf(date.getDay())) < 0)
{
// open our add event dialog
$('#add-event-form').dialog('open');
}
};
Regards,
Darrel Viegas.