The plugin is an item plugin. Its options (shown below) are similar to the APEX date picker. The main difference is that instead of having Minimum and Maximum date attributes you now have Date Type and Corresponding Date Item attributes. The Date Type can either be a From or To date (i.e. min/max date). The Corresponding Date Item is the item name for the date picker that will determine the date's restrictions.

I've created a demo on plugins.clarifit.com. If you select a date in the From Date field (in this case 24-Nov-2011) then open the To Date date picker you'll notice that you can't select anything before 24-Nov-2011 as shown below.

The plugin also comes bundled with some nifty features that may not be visible at first but are really useful:

Allows for different From/To date formats (i.e. they don't need to be the same).

Built in validations:

Validates that the input is a valid date

Validates that From Date is less than or equal to the To Date

Javascript Console instrumentation (run the page in debug mode and look at the console)

Note: The built in validations will run as part of the page's validations and are only executed if you enable validation as part of your submit button.

17 comments:

Hi Martin,I kept getting compatibility errors when trying to install this into APEX XE 4.0.2.00.09. Message reads "NOT COMPATIBLE (Your export may contain calls not supported by your application version.)". Have you any ideas as to why this would be?ThanksAlan

Hi, this is a really useful plug-in for an app I have been developing. I wondered if you had any ideas/plans on how I could do something similar in a tabular form. Basically N rows will be displayed and the start date of a particular field must have a min-date set to the value of the same item on the row above ( the rows always be fixed in their display seq ). At the point save, no date can be earlier than the date on the row before , ie. sequential.Thanks

If you take a look at the JS code provided with the plugin you can see what I did to enforce the min max dates and use that for your tabular form. You'll obviously need to modify the code and also add some additional attributes to your tabular form fields.

Great plugin. Worling fine on Apex 4.1.0.00.32 running on 11G, but can't get it to work under the same Apex release on Oracle XE. I've followed the steps in the book but teh Firebug console gives me the following error on page load"$.ui is undefined[Break On This Error] {"triggeringElementType":"BUTTON","tri....CLARIFIT.APEXPLUGIN.APEX_DIALOG"}]},f?p=10...16::::: (line 115)"

Can you please post a copy of your application on apex.oracle.com and then give me access to the workspace / application. You can email me the login credentials (my email is in the top right corner of the blog)

Difference noticed in Shared Components/Plug-ins/Edit, the Internal Name and Type are both readonly on apex.oracle.com wherea on my site they are text field and select list respectively.When i apply changes, same error.