Flex DateChooser组件,42天,显示上个月/下个月的天数
在 DateChooser 组件上,它仅显示当前月份的天数...但我想显示上个月的一些天和下个月的一些天。
是否可以在 DateChooser 组件上设置一个属性来显示 42 天。我的意思是,显示上个月的一些天+当月的天+下个月的一些天。我不确定这叫什么...
如果您查看典型的月历,例如 2011 年 6 月,它会显示:
S M T W Th F Sa 20 30 31 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 2 3 4 5 6 7 8 9
但是,在 DateChooser 控件上它是这样的:
S M T W Th F Sa 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
是否有一个我忽略的属性显示前几天的一些日子。当前月份视图中的月份和下个月?或者我需要扩展 DateChooser 组件并重写方法吗?希望对此有一些指示......谢谢。
On the DateChooser component, it shows the days for only the current month... but i'd like to show some of the previous month's days and some of the next month's days.
Is there a property to set on the DateChooser component to show 42 days. I mean, to show some of the previous month's days + the current month's days + some of the next month's days. I'm not sure what this is called...
If you look at a typical month calendar, for example for June 2011 it shows:
S M T W Th F Sa 20 30 31 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 2 3 4 5 6 7 8 9
However, on the DateChooser control its like this:
S M T W Th F Sa 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
Is there a property that I've overlooked which shows some of the days from the prev. month and next month in the current month view? Or would I need to extend the DateChooser component and override a method? Would appreciate some pointers on that.. thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我称之为前导日和尾随日;我不相信 DateChooser 默认支持这一点。因此,您必须扩展 DateChooser,并且很可能扩展(未记录的)CalendarLayout 类,该类执行 DateChooser 布局。这可能会有点乏味,但绝对可行。
Flextras 日历 支持前导日和尾随日;然而,它是为显示日期数据而设计的;不适用于选择日期。由于您的用例似乎是选择日期;您可能会更好地修改 Flex DateChooser,而不是尝试将我们的组件硬塞到您的用例中。
I call it leading and trailing days; and I do not believe DateChooser supports this by default. So, you'll have to extend the DateChooser, and most likely the (undocumented) CalendarLayout class, which performs the DateChooser layouts. It'll probably be a bit tedious, but definitely doable.
The Flextras Calendar does support leading and trailing days; however it is designed for displaying dated data; not for selecting dates. Since your use case appears to be selecting dates; you'll probably be better off modding the Flex DateChooser instead of trying to shoehorn our component into your use case.