Честно говоря, было бы проще написать функцию util, которая делает это, не используя DateChooser
function getDatesForDaysInMonth(year:Number, month:Number, dayOfWeek:Number):Array {
var dts:Array=[];
var dt:Date=new Date(year, month, 1);
var firstInSeries:Date=new Date(dt);
firstInSeries.date += (dayOfWeek-dt.day);
if(firstInSeries.month != month) {
firstInSeries.date += 7;
}
dts.push(firstInSeries);
for(var i:int=1; true; i++) {
var it:Date=new Date(firstInSeries.valueOf() + i*7*24*60*60*1000);
if(it.month != month) {
break;
}
dts.push(it);
}
return dts;
}
//tester function
function disp(a:Array):void {
for(var i:int=0; i<a.length; i++) {
trace(i + ": " + a[i].toString());
}
trace("------------------");
}
trace("Sat");
disp(getDatesForDaysInMonth(2012, 2, 6));
trace("Fri");
disp(getDatesForDaysInMonth(2012, 2, 5));
trace("Thu");
disp(getDatesForDaysInMonth(2012, 2, 4));
trace("Wed");
disp(getDatesForDaysInMonth(2012, 2, 3));
trace("Tue");
disp(getDatesForDaysInMonth(2012, 2, 2));
trace("Mon");
disp(getDatesForDaysInMonth(2012, 2, 1));
trace("Sun");
disp(getDatesForDaysInMonth(2012, 2, 0));