Monday, April 18, 2011

Hiding calendar control in APEX

If we do this,

It disables the text compoenent of  the calendar control, but the calendar icon still remains visible.
To hide the control completely, i.e the text part as well as the calendar icon, use the DOM and the html_HideElement function. see below the tweaked function courtesy OTN.
Lets say for example, we have to show or hide the calendar control based on the selected values from an LOV. i.e. for some values the calendar is to be shown and for some other values the calendar is to be hidden. this can be achieved as shown below


call the function onChange of LOV values.