[英]Flex DateChooser: how to override the 'today' date?
By default, the Flex DateChooser highlights the 'today' date. 默认情况下,Flex DateChooser会突出显示“今天”日期。 I assume it gets this date from the OS.
我假设它从操作系统获得此日期。 Is there a way to tell DateChooser what the 'today' date should be?
有没有办法告诉DateChooser“今天”的日期应该是什么?
By looking at the source code of mx.controls.CalendarLayout
(which is used internally by DateChooser
): 通过查看
mx.controls.CalendarLayout
的源代码(由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. 您可以扩展/替换
DateChooser
和CalendarLayout
类,并覆盖相关的函数。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.