Disable Date Picker In Oracle APEX

We will disable the date picker because sometimes we don’t need to allow editing (due to some privilege ).

The approach is using JQuery:
Create a JavaScript function :

function disableDatePicker() {
 $('.hasDatepicker').each(function () {
  $(this).addClass('apex_disabled').next('button').addClass('apex_disabled');
 });
}

Since you run this function on page (Execute on page load OR any event where you want ) all the date pickers will be disabled.

Your Item becomes Disabled.

If You Want only one item as per requirement:

Create a JavaScript function:

function disableDatePicker(p_this) {
 $('#' + p_this).addClass('apex_disabled').next('button').addClass('apex_disabled');
}


While calling this function pass the item Name in the function

disableDatePicker('P_DATE');

All set to play with disable.