Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

javascript to calculate days between two date pickers

blue72TAJul 14 2011 — edited Jul 21 2011
Hello all,

Apex version 3.1.2

I have a SQL Query (Updateable Report). Two of the tabular form elements are date pickers. When the date pickers are populated by the user I need javascript to populate a third field with the days between the chosen dates.

Interestingly enough I was able to use javascript and an application process (based on an example from Denes Kubicek) to calculate the days between the value of 2 date pickers and populate a 3rd field (length of service) in an HTML region, however I just can't seem to make it work in the SQL Query (Updateable Report) region. My main problem is I can't find a way to identify/name the date picker fields. In the HTML region is was easy, I just used the field names (:P2_CONTRACT_START_DATE, :P2_CONTRACT_END_DATE, :P2_LENGTH_OF_SERVICE) and then used PL/SQL in the application process to do the date arithmetic.

Can anyone please help me with the javascript (onChange function) syntax needed to read the values of the two date picker fields in the Updateable Report Region and populate the third field with the days between?

Thanks Much!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 18 2011
Added on Jul 14 2011
1 comment
647 views