The date picker item type has had a makeover in APEX 4.0. Instead of opening a calendar in a separate browser window with a basic calendar, APEX now shows an ajax style calendar. Also with a lot more options to configure the calendar.
A much better looking calendar then the popup window in previous versions and also a lot faster for the user. But it is not just about the look and feel, but the new date picker also gives a number of settings to control the calendar.
With the setting Highlighted Date you specify the date to be highlighted when showing the calendar. The settings Minimum Date and Maximum Date define the minimum and maximum date selectable in the calendar. This way you can restrict what date a user can select, a very nice addition. These three date picker properties can all be defined in three ways:
- Absolute, for instance 16-APR-2010
- Relative to today’s date, for instance +1y+1m+1w sets the allowed date to 1 year, 1 month and 1 week after today.
- Item value, the date is determined from the value of a page item, for instance &P1_DATE.
As you can see a lot of options to control the input values of your date picker item. The example below shows setting the minimum and maximum date to a week relative to today’s date. You cannot select another date the the range specified.
The show setting defines when the calendar has to be shown. There are four possible settings:
- on focus: shows the calendar when the item receives focus
- on icon click: shows the calendar when the date icon is clicked
- both: shows the calendar when either of the above events take place
- inline: shows the calendar directly on the page , without an input item
The last date picker setting I will discuss is the Number of Months setting. This setting controls the number of months displayed at once. This can be a single number, for instance 2, this will display two months next to each other. But it can also be an array of two numbers (between brackets), for instance [2,2], this will display four months at the same time in two rows and two columns.
All in all a very big improvement over the date picker in previous APEX versions.[Oracle APEX 4.0] New date picker,