Follow Us on Twitter

[Oracle APEX 4.0] New date picker

by Peter van der Neut on April 16, 2010 · 6 comments

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.

In previous APEX versions the date picker looks like this:

This is how the date picker looks in APEX 4.0:

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, 4.1 out of 5 based on 8 ratings
VN:F [1.9.22_1171]
Rating: 4.1/5 (8 votes cast)
Tags: ,

6 comments on “[Oracle APEX 4.0] New date picker

  1. Yes, this is the datepicker we all have been waiting for in Apex. The interaction is well-thought, really nice. Thanks for sharing, Peter.

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  2. Victor Bax on said:

    Is it also possible to include the time in this date picker? In the previous version of ApEx you could include a time, but who wants to select minutes 1 thru 59. I would settle for 15, 30, 45 minutes and the whole hour. Is it possible to set this anywhere? It would be a great help.


    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    • Peter van der Neut on said:

      Hi Victor,

      When you include the time you will still get a drop down list with all the minutes 00 through 59. There seems to be no setting to control the time fields in the date picker.

      Maybe you can submit a feature request for his.

      VN:F [1.9.22_1171]
      Rating: 0 (from 0 votes)
  3. jovaini on said:

    hi Dear
    In Apex 4.0 How can used the Persian calendar
    Because the gregorian year is different with the Persian
    For example, in 2010 gregorian=1389 Persian
    my nls_calendar=persian

    When the “nls_calendar =persian” then all date values are show to gregorian.

    Thanks a lot

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  4. hi, do u know how to make to the mimimum date be today and works? thanks!

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  5. @abraxas, +0d in minimum field..
    What i don’t understand about that part is that when you want to update a record that allready has a date filled, how to make it save my record without apex nagging about the date… because at the time of saving that record the date was in the future so its fine that the record holds his old date.



    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

Leave a Reply

Your email address will not be published. Required fields are marked *


* Copy This Password *

* Type Or Paste Password Here *

59,386 Spam Comments Blocked so far by Spam Free Wordpress

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>


Previous post:

Next post:

About Whitehorses
Company profile

Whitehorses website

Home page

Follow us
Blog post RSS
Comment RSS