Skip to main content


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

Setting a date range

Updated on December 13, 2022
Applicable to Theme Cosmos applications

Provide users with a convenient way of selecting dates within specific ranges by improving the Date Time control functionality. For example, when users expense business trips for a specific quarter of the year, you can set that period of time as a date range to make the process clearer.

Before you begin: Add a Date Time control to the layout.

For more information, see Adding UI components to a view.

  1. Open the view with the control that you want to edit.
    For more information, see Accessing views in your application.
  2. In the configuration pane on the right side of the window, hover over the control, and then click the Edit icon.
  3. On the General tab, in the Type row, click Date range.
  4. On the Presentation tab, in the Editable settings section, enter the date range from which users can choose in the yyyy-mm-dd format.
    For example: In the Max date field, enter 2020-05-15 to limit the date range to May 15, 2020. The succeeding dates become inaccessible.
  5. On the General tab, in the From date and To date sections, configure the date range:
    1. In the Property field, press the Down arrow key, and then select a specific property that contains data for your range.
    2. Optional: To enter a custom name for the Date Time control, in the Label row, clear the Use property default checkbox, and then, in the Label value field, enter a new name.
      For example: In a booking application, you can label the control as Check in or Check out.
    3. In the Default value field, enter a suggested date that automatically appears in the calendar.
      For example: To set October 25, 2020 as the default date for the beginning of your date range, enter 2020-10-25.
    4. In the Placeholder field, determine the placeholder text for the control.
      Note: Because Placeholder text might cause accessibility and usability issues, it is not a recommended form of text in field. Use the Field label or Helper text fields instead.
    5. In the Helper text field, describe the purpose of the control that users see at run time:
      For example: In a booking application, you can select Always visible/in-line, to include an information that the minimum length of stay is three days.
  6. Click Apply.

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