Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Restricting the years displayed

Updated on November 15, 2021
Applicable to Theme UI-Kit applications

To make it easier for users to select valid dates, you can restrict the number of years that are displayed relative to, and including, the current date. At run time, only values that fall within the range of dates that you specify are visible on the calendar widget or available by using spinners or drop-down fields.

Before you begin: In the layout of the form that you are editing, complete the following task: Adding a Date time control to a layout.
  1. Click the control, and then click the View properties icon.
  2. For the Display Range option on the Presentation tab of the Properties panel, specify a number of years in the Previous __ years field, the Next __ years field, or both.
    By default, both fields are set to 10 years.
    When the Display mode field is set to Text Input + calendar and an application user enters a date that is outside the range of years that you specify with the Display Range option, the range of years is updated automatically to include a range of years starting from the entered year or ending at the entered year.
  3. Click Submit.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us