Posts

Showing posts from July, 2024

Creating Custom Date Selectors in Oracle APEX: Month, Quarter, and Year

Image
Introduction Ever craved more control over date pickers in your Oracle APEX applications? The buit-in options might not always offer the perfect fit. This post explores a technique to create custom date selectors for specific needs: Month Selector  -> choose just month and year Quarter Selector -> select quarter and year Year Selector -> pick only the year  Crafting Custom Selectors:   Create Text Fields: We'll create three page items of type Text Field  : P2_MONTH, P2_QTR and P2_YEAR Add Calendar Buttons with jQuery: We'll leverage jQuery to dynamically add calendar buttons next to each text field. These buttons trigger the datepicker functionality. In the Post Text attribute of each item, add the following code: For P2_MONTH < button type = "button" style = " height:100%" class = "a-Button a-Button--calendar" onclick = " $ ('#P2_MONTH'). datepicker ('show');" > < span class