The Flash Forms calendar controls can restrict selectable date ranges. Fixes dates can be specified using the startRange and endRange attributes, but what if you need to programmatically change the ranges at runtime? The following example does just that, it uses two calendar controls to prompt for start and end dates, and uses a couple of lines of ActionScript to ensure that the end date cannot be before the start date.
var dtRangeStart=new Date(calStart.selectedDate);
calEnd.selectableRange={rangeStart: dtRangeStart};
A live example can be viewed at http://www.forta.com/misc/flashforms/calendarrange.cfm.
Leave a Reply