Skip to main content


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

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

Selecting the date and time format and display mode

Updated on April 5, 2022

You can specify which date and time element selectors are displayed on the form at run time. For example, you can display a calendar widget with a corresponding text input field or display drop-down fields for selecting the month, day, and year.

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. On the Presentation tab of the Properties panel, use the Specify size option to specify the width of the control:

    • To automatically adjust the control area width to the layout, click Auto.
    • To manually specify a fixed width for the control, click Custom. In the Width fields enter the size in pixels or as a percentage.
  3. Set the Date/Time option to one of the following settings:

    • To automatically choose the proper format based on the data requirements, select Auto.
    • To display selectors for both date and time, select Date Time.
    • To display only selectors date, select Date.
    • To display only selectors time, select Time.
  4. To specify how dates and times are displayed in your application, set a Display mode list.

    Your choice for the Date/Time option determines which settings are available for the display mode.

    • To display a text input field with a selectable calendar widget, select Text input +calendar.
    • To display a series of drop-down fields for selecting months, days, and years, select Dropdown lists.
    • To display text input fields, select Text input.
      Note: This setting is available only if you set the Date/Time option to Date.
  5. Optional:

    To refine the display of the date and time, select one or more of the following options. Your choice for the Display mode option determines which options are available.

    • To display the month's full name at run time, select Display month in long format.
    • To override locale settings for users with locale settings that display the year before the month, select Ignore month and year position from locale settings.
    • To enable the use of native rendering on mobile devices, select Use native control on mobile.

      At run time, the date and time pickers use the mobile browser's native calendar date and time pickers.

    • To display the date according to your settings in the Read-Only Format section, select Display value using read-only formatting.
    • To use A.M. as the default when users enter times, select Set AM as default.
  6. For the Allow text entry option, click Yes (default) to enable the user to enter a text value in the field or click No to prevent text entry.

  7. Click Submit.

  • Date time (calendar) control

    To present a date, time, or both on a form, use the Date time control. You can modify the control features to improve user experience by making date and time selection simple and intuitive. For example, you can choose to display the calendar widget with spinners to make it easier to switch between months and years.

  • Specifying presentation options for a Date time control

    You can specify how read-only dates or date and time combinations are displayed in your application. For example, you might specify that the year comes first, or that months are spelled out rather than represented numerically.

  • Selecting spinners or drop-down fields for navigation

    You can specify whether your application users select dates and times with spinner controls or drop-down fields.

  • Restricting the years displayed

    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.

  • Displaying week numbers in calendar widgets

    If users are accustomed to seeing week numbers in calendars, you can specify that the week numbers are displayed along the left side of the calendar widget in your application. The week numbers are shown according to the ISO 8601 standard date notation. Week numbers may vary, depending on locale.

  • Disabling the selection of weekend days

    To make it easier for users to select valid dates, you can disable weekend dates so that users cannot select them in your application. Weekend (non-working) dates can be based on the user's calendar or on another business calendar.

  • Setting intervals of minutes

    By default, the time picker displays minutes from 0 through 59. To restrict the time selections available to users, you can configure your application to display intervals of minutes on time controls, instead.

  • Specifying read-only and edit options for a Date time control

    Edit options determine when a control is editable or read-only for the application's users.

  • Specify actions for a control

    You can specify action sets—event-action pairings—to determine the behavior of a control. For example, you might specify that clicking a button triggers the refresh of a section. You can define multiple events and actions in an action set, and you can create multiple action sets for a single control.

  • Copying, moving, or deleting a control

    You can use basic Windows operations to speed the development of your controls.

  • Previous topic Specifying read-only and edit options for a Date time control
  • Next topic Selecting spinners or drop-down fields for navigation

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