如何根据 Oracle Apex 中的日期选择器选择加载选择列表?
我有一个日期选择器,但也有三个选择列表:日、月和年。如何在使用日期选择器选择日期后立即加载这些内容?
I have a date picker, but I also have three select lists for Day, Month, and Year. How can I load those as soon as the date picker is used to select a date?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我做了一个小例子:这里
我设置了标准日期选择器,我确实限制了这个日期选择器的年份范围(2005-2015)。
我用静态爱填满了三个选择列表:天 -> 。 1 至 31,月份 -> 1 到 12 但以他们的名字作为显示值,年份 -> 2005 年到 2015 年。
为了设置它们的值,我在日期选择器上创建了一个动态操作:
需要 3 个操作来设置每个选择列表的选定值。但请注意,这会导致 3 个 ajax 调用。但实现是基本的,不需要您编写 javascript 和 ajax 回调。
每个动作都与此类似:
TO_CHAR(TO_DATE(:P24_SOME_DATE), 'DD')
LTRIM(TO_CHAR(TO_DATE(:P24_SOME_DATE), 'MM'), '0')
TO_CHAR(TO_DATE(:P24_SOME_DATE), 'YYYY')
混合搭配以满足您的需求。希望这有帮助!
I've made a small example: here
I have the standard datepicker set up, i did restrict the range of years on this one (2005-2015).
The three select lists i have filled up with static lovs: days -> 1 through 31, months -> 1 through 12 buth with their name as display value, years -> 2005 through 2015.
To set their values, i created a dynamic action on the datepicker:
3 actions are required, to set the selected value of each select list. Be aware though, this causes 3 ajax calls. But the implementation is basic and doesn't require you to write javascript and ajax callbacks.
Each action is similar to this one:
TO_CHAR(TO_DATE(:P24_SOME_DATE), 'DD')
LTRIM(TO_CHAR(TO_DATE(:P24_SOME_DATE), 'MM'), '0')
TO_CHAR(TO_DATE(:P24_SOME_DATE), 'YYYY')
Mix 'n Match to suit what you need. Hope this helps!
年份范围,只填上一年,与手动无关。
In Year range, just put the previous year nothing to do with Manual.