Flex DateChooser: how to redefine today's date?

By default, Flex DateChooser highlights the date today. I guess he gets this date from the OS. Is there a way to tell DateChooser what today's date is?

+3
source share
1 answer

Studying the source code mx.controls.CalendarLayout(which is used internally 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 can, couse, extend / replace classes DateChooserand CalendarLayoutand override the corresponding functions.

+2
source

Source: https://habr.com/ru/post/1703277/


All Articles