Oracle APEX 24.1: Date Picker for Faceted Search and Smart Filters

June 17, 2024 | 3 minute read
Monica Godoy
Senior Principal Product Manager
Text Size 100%:

Faceted Search and Smart Filters are powerful ways to filter and display your data, allowing users to set filters on the left or upper side of the screen. 

In APEX 24.1, we introduced Date Picker support for Input Facets and Manual Range Inputs on Faceted Search and Smart Filters Regions, where you can set your own format mask for date representation.

Let me show you how you can customize your date picker depending on your needs with these three quick examples:

  1. Range facet with a list of values.
  2. Range facet using a start and end date.
  3. Input field.

Install the EMP / DEPT  sample dataset

In order to have some data to work on the examples, let's install a sample dataset.

  1. Navigate to SQL Workshop > Utilities > Sample Datasets.
  2. Click on Install for the EMP/DEPT dataset and follow the wizard steps.

Create an app

  1. Navigate to App Builder and click Create.
  2. Enter the name: Date Picker Support  and click Use Create App Wizard.
  3. Click on Add Page and select Faceted Search.
    1. For name, enter Employees Report.
    2. For table, select EMP.
    3. Click Add Page.
  4. Add more pages to your app as you need and once you are ready, click on Create Application.

Range facet with a list of values

In this example, users can check the proper checkbox to filter employees hired before 2024 or in 2024.

  1. Create a new facet and enter the following:
Add a new facet
Fig 1. Creation of a new facet
  • For name, enter PX_HIREDATE.
  • For type, select Range.
  • Switch on the select multiple attribute.
  • For icon, enter fa-calendar-edit
  • For list of values type, select Static Values.
  • For static values, enter:
    Display Value Return Value
    In 2024 20240101000000|
    Before 2024 |20240101000000
  • For database column, enter HIREDATE.
  • For data type, select DATE.

Range facet using a start and end date

This example allows users to enter a range of dates to filter the employee's hire date.

  1. Create a second facet and enter the following:
  • For name, enter PX_HIREDATE2.
  • For type, select Range.
  • Switch off the select multiple attribute.
  • For label, enter Hiredate - Range.
  • For icon, enter fa-calendar-edit
  • For format mask, enter DD-MON-YYYY.
  • For database column, enter HIREDATE.
  • For data type, select DATE.

Input field

This last example, allows users to enter one specific date to filter employees hired on that date.

  1. Create a third facet and enter the following:
  • For name, enter PX_HIREDATE3.
  • For type, select Input Field.
  • For format mask, enter DD-MON-YYYY.
  • For database column, enter HIREDATE.
  • For data type, select DATE.

After you have made the changes, click Save and Run Page.

You can also implement similar filter behavior on a Smart Filters page:

Smart Filters with Date Picker Support
Test these new enhancements and other new features in APEX 24.1 on Oracle Cloud, apex.oracle.com or download this release from apex.oracle.com/download.

Monica Godoy

Senior Principal Product Manager

Mónica Godoy is a Senior Principal Product Manager for Oracle APEX

Before she joined the APEX Team, she worked as an Oracle APEX Consultant, modernizing Oracle Forms apps and developing new applications with Oracle APEX.
Mónica also encourages women to be part of the APEX Community at www.womeninapex.com

Show more

Previous Post

Vacation Rules for out-of-office management of Human Tasks in APEX 24.1

Ananya Chatterjee | 13 min read

Next Post


APEX 24.1: REST Data Sources and nested JSON responses

Carsten Czarski | 11 min read
Oracle Chatbot
Disconnected