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!

Apex 5 Calendar Region - End Date off by one

Jeffrey KempJan 20 2016 — edited May 11 2016

If I create a calendar region based on a table with a Start Date and End Date (no time values), and set the End Date Column attribute, the region appears to interpret the end dates as being the day after the actual last day of a multi-day event.

For example, if I have an event that starts on 1 Jan and ends on 10 Jan, the hover-text will show the correct dates ("Jan 1 - 10, 2016") but it will only be rendered on the calendar on Jan 1 to 9 (missing the 10th).

I tried modifying the query to use END_DATE+1 as the end date, which causes the calendar to render the event on the correct dates on the calendar, but now the hover-text shows the wrong dates ("Jan 1-11, 2016") and there is no option to change or hide this part of the hover-text. I also tried END_DATE+0.99999 but this had no effect.

Note: a similar off-by-one problem exists for the Drag and Drop PL/SQL Code - I have to subtract one day from the end date to get it to work correctly (this is not a big issue in itself, the workaround works):

UPDATE events
SET start_date = TO_DATE(:APEX$NEW_START_DATE, 'YYYYMMDDHH24MISS')
      ,end_date   = TO_DATE(:APEX$NEW_END_DATE, 'YYYYMMDDHH24MISS') - 1
WHERE event_id = :APEX$PK_VALUE;

Strangely enough, if I drag-and-click a date range, the date passed in the Create Link using &APEX$NEW_END_DATE. is the correct date as expected!

This post has been answered by minwenlo on May 11 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 8 2016
Added on Jan 20 2016
2 comments
1,985 views