Font Size:
Ask Joget AI

Limit Date Range for "From Date" & "To Date" Date Picker Fields

Introduction

To ensure users select valid date ranges in forms, you can set restrictions on the "From Date" and "To Date" Date Picker fields. This validation feature will ensure that both dates do not fall before the current date and that the "To Date" is always later than the "From Date."

How does it work?

  1. Begin by setting up a new App and Form. In the Form Builder, place two Date Picker element onto the canvas. Configure each element's Label and ID, using 'From Date' and 'fromDate' for the first, and 'To Date' and 'toDate' for the second."
  2. In the Properties panel for both Date Pickers, scroll down to the Validation section and configure the Start Date Field ID and End Date Field ID.
  3. Save and Launch the runtime.

Expected outcome

In the runtime, you can verify that the To Date field's range is successfully limited by the selection in the From Date field.

Download sample app

Download the demo app for Limit Date Range for "From Date" & "To Date" Date Picker Fields
Created by Nur Baizura Badrul Sham Last modified by Debanraj Ravindran on Apr 24, 2026