ApEx 4.0: Date Picker Item Minimumdate and Maximumdate

One of the big improvements of ApEx 4.0 in my opinion is the rebirth of the date picker Item. The old version of the date picker was a popup that opened a calender, it was ok but a lot of developers already used something more sexy like the jQuery Ui Datepicker. This required some custom development and was’t out of the box functionality.

In ApEx 4.0 the date picker got a new look and feel based on the jQuery Datepicker. It opens a lot faster and is overall more simple to use. You don’t have to create a validation anymore to check if the user has specified a valid date, this is done automatically.

Some new properties are available for the date picker:

– Selected Date
– Minimum Date
– Maximum Date

If used, all 3 properties need to be filled in with a format of YYYYMMDDHH24MI and NOT with your Date Picker or Application Date Format. ApEx will automaticly trigger a validation when a user selects a date not in the specified range.

Please note that you can also use the syntax of +1d and -1d to specify a range for dates, this indicates sysdate + 1 day and minus one day. A consequence of using the interval is that a user will not be able to select a date outside of the range using the date picker. The date picker will be limited to just the interval.

An example with a range of +2d and -2d

Conclusion: the date picker has improved dramatically and makes life more simple for you as developer.