您的位置:首页 > 数据库 > Oracle

EBS form日历可选范围设置(calendar.setup )介绍

2015-10-30 14:14 489 查看
Calendar是Template提供给我们的standard object.可以使我们方便的为日期型字段提供日期的选择列表.

form中设置日历方法:

1. 为日期型字段指定LOV(ENABLE_LIST_LAMP)

2. 在字段的KEY–LISTVAL事件中编写代码:Calendar.show

Calendar Package包含如下几个Procedure:

1. Calendar.show(first_date date default null)

显示日期选择列表. 默认参数为空,即当前日期为高亮.也可定义任意日期为高亮,即设置first_date.

日历可选范围设置方法:

2. Calendar.setup (new_type varchar2 --必填

,low_date date DEFAULT null --可选,为此日期之前

,high_date date DEFAULT null --可选,此日期之后

,sql_string varchar2 DEFAULT null);

(在show之前写!!)

设置日期范围.例:

A. calendar.setup(’WEEKEND’) 禁止选择周末.

B. calendar.setup(<30 char identifying name>, <low_date>,<high_date>); 禁止选择某一日期段,可重复使用.

C.calendar.setup(<30 char identifying name>, null, null,<SQL>); 禁止选择SQL提取出的日期清单.

D. calendar.setup(<30 char identifying name>, <low_date>,2009-01-01);只能选择2009-01-01后的日期.

E. calendar.setup(<30 char identifying name>, 2009-01-01,<high_date> );只能选择2009-01-01前的日期.

如下,只能选择当前日期之前的日期:

calendar.setup('lower then sysdate',SYSDATE,null);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息