﻿function disableSundays(sender, args) {
    if (args.date.is().sunday()) {
        // If the cell is a Sunday, disable by setting
        // the cell contents to the day number.
        args.cell.innerHTML = args.date.getDate();
    }
    return args.cell;
}

function disableSundaysValidation(sender, args) {
    if (BasicDatePicker1.getSelectedDate().is().sunday()) {
        args.IsValid = false;
        return;
    }
    args.IsValid = true;
}