Weekends and Time range in Calendar?

Oracle Application Express is a rapid development tool for Web applications on the Oracle database.
Post Reply
admin
Posts: 2093
Joined: Fri Mar 31, 2006 12:59 am
Location: Pakistan
Contact:

Weekends and Time range in Calendar?

Post by admin »

Select calendar region then attriburtes and Initialization JavaScript Function

Code: Select all

function(poptions) {

  // Show weekends
  poptions.weekends = true;

  // Days of the week: 0=Sun, 1=Mon, 2=Tue, 3=Wed, 4=Thu, 5=Fri, 6=Sat
  poptions.firstDay = 1;

  // Show week numbers in the calendar
  poptions.weekNumbers = true;
  // poptions.weekText = "Week:";

  // Slot duration in time grid (how each row is spaced by time)
  poptions.slotDuration = "00:45:00"; // 15-minute slots

  // Define visible time range
  poptions.slotMinTime = "09:00:00";  // Start time
  poptions.slotMaxTime = "18:00:00";  // End time

  // Highlight weekends
  poptions.dayCellDidMount = function(info) {
    const day = info.date.getDay();

    if (day === 0 || day === 6) { // Sunday or Saturday
      info.el.style.backgroundColor = '#f0f0f0';
      info.el.style.color = '#999';
    }
  };  

  return poptions;
}

cal1.jpg
cal2.jpg
You do not have the required permissions to view the files attached to this post.
Malik Sikandar Hayat
Oracle ACE Pro
info@erpstuff.com
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests