IntervalCalendar for Date-Range Selection

By YUI TeamAugust 22, 2008

New YUI interval-calendar example contributed by John Peloquin.

John Peloquin, a developer for W. Hardy Interactive, Inc., graciously contributed a new YUI Calendar implementation called IntervalCalendar that we've incorporated into the basic YUI Calendar example set.

The IntervalCalendar class, defined in this example, allows users to select pairs of dates representing the start and end of a date interval. Applications which require interval selection, for example a hotel check-in/check-out date selector, frequently display separate calendar instances to select the beginning and ending dates of the interval. The IntervalCalendar provides an alternate solution, by allowing the selection of both dates within the same calendar instance. It's most suitable for applications in which the beginning and ending dates fall within the span of a few days, so that the entire range falls within the calendar's visible set of months.

Many thanks to John and Walter Hardy for the terrific example and for contributing to YUI.