By default, the Flex DateChooser highlights the 'today' date. I assume it gets this date from the OS. Is there a way to tell DateChooser what the 'today' date should be?
+2
A:
By looking at the source code of mx.controls.CalendarLayout
(which is used internally by DateChooser
):
// Determine whether this month contains today.
var today:Date = new Date();
var currentMonthContainsToday:Boolean = (today.getFullYear() == newYear && today.getMonth() == newMonth);
it seems that you have no influence on this. You could, of couse, extend/replace the DateChooser
and CalendarLayout
classes, and override the relevant functions.
David Hanak
2009-02-16 11:15:32
Thanks for pointing me in the right direction. Cheers
Mike Sickler
2009-02-16 11:19:42
+1 think extending the CalendarLayout class would be a tough job though. CalenderLayout is enormous and it's probably very easy to break
James Hay
2009-02-16 11:22:19
@James: agreed. Still, I guess this is the only option if one really wants to change "today".
David Hanak
2009-02-16 12:16:15
A:
I am looking for something similar, cannot find anything yet.
Mike, wondering if you found a good way of implementing this, other than writing custom DateChooser and CalendarLayout components.
Tejas
2010-06-28 21:40:56