<p>To construct a calendar where the user can only select future dates, the code would read as follows:</p> <textarea name="code" class="JScript" cols="60" rows="1"> var cal1; function init() { cal1 = new YAHOO.widget.Calendar("cal1", "cal1Container"); cal1.minDate = YAHOO.widget.DateMath.add(new Date(), YAHOO.widget.DateMath.DAY, 1); cal1.render(); } </textarea> <p>Notice that we're setting the minimum date to tomorrow's date by adding one day to a newly instantiated date (using the DateMath helper class) and setting it into the calendar's minDate property. cal1.maxDate remains null since there is no restriction on how far into the future the user can make selections.</p> </div>