datepicker01

The Basics: jQuery Datepicker in APEX

datepicker01

Let’s Get

datepicker02datepicker03

Set it

datepicker04
Well, it works! This is what the Datepicker looks like after setting the min- and maxDate.

Wrap it up


If now we combine getting the values of the Min./Max. Date page items and setting the the minDate/maxDate options of the “Actual Date”  item, put this into a Dynamic Action, lets say: “execute JavaScript on the Change events of the first two date fields”, we should have exactly the intended behavior.

datepicker05
datepicker06
datepicker07
datepicker08

Do the same for P1_MAX_DATE using the code:

$(“#P1_DATE”).datepicker( “option”, “maxDate”, $(“#P1_MAX_DATE”).val());


Just two statements! See for yourself and visit the demo page. Of course the variations of this approach are countless, but the basic two statements will remain: getting the value and setting the range options.

Have fun APEX-ing.

Source Article from http://rokitta.blogspot.com/2012/09/dynamic-date-range-in-apex-datepicker.html
Dynamic Date Range in APEX Datepicker – no Plugin required
http://rokitta.blogspot.com/2012/09/dynamic-date-range-in-apex-datepicker.html
http://rokitta.blogspot.com/feeds/posts/default
Oracle & Apex Geekery
And another thing …

Leave a Reply