<h1>
    Calendar Validation
</h1>

<p>
    The Calendar control prevents users from selecting values
    outside the range determined by the <b>min</b> and <b>max</b>
    properties.
</p>
<p>
    In many cases, however, not all dates in the range are valid.
    To handle these situations, the Calendar control has an
    <b>itemValidator</b> property. This property represents a
    function that takes a date as a parameter and returns true
    if the date is valid for selection, or false otherwise.
</p>
<p>
    The calendar below demonstrates this. It prevents users
    from selecting dates on weekends and holidays:
</p>
@Html.C1().Calendar().Id("theCalendar")
<div>
    The current date is <b><span id="theCalendarOutput"></span></b>.
</div>