---
sourceDocument: Brazil Build or modify applications
sourceDocumentLink: https://www.servicenow.com/docs/r/application-development

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil Build or modify applications

ft:clusterId :

    - cadev

bundleId :

    - cadev

workflow :

    - Development, Data, and Analytics


---

# Date-Time component setup

# Date-Time component setup {#ariaid-title1}

Release version: Brazil  
Updated September 10, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 11 minutes to read  
The Date-Time component is a form control that enables users to input or select a date, time, or date and time value.

## Before you begin

This component contains a preset configuration. Presets
automatically configure properties and event handlers for a component, making the
component ready to work when you add it to a page. You can apply one preset to a single
instance of a component on a page. For more information, see [Automatically configure components using presets](https://www.servicenow.com/docs/eFRoznvnJXSEND1RjAXpSg#presets "Use component presets to automatically configure components on compatible pages.") .

A preset connects to a controller, which acts as a data
resource for the component. Controllers provide the configuration data and event binding
the component needs to function in your experience. For more information see [Bind data to UI pages using controllers](https://www.servicenow.com/docs/P52VaYAm9py9PHh7UM81~A#controllers "Controllers simplify the linking of data and event logic to enable component presets in UI Builder.") .  
This task assumes you have placed the component on the page and are ready to configure the properties and events. For instructions on accessing and using features in UI Builder, see [Customize UI Builder pages using components](https://www.servicenow.com/docs/YMtTz79hYjmj5_kMcObIuA "Learn what a component is in UI Builder. Also, see how components work within UI Builder.").  
Note:  
This document describes the latest component functionality. Go to the store to make sure you have the latest version of the component.

Role required: admin or ui_builder_admin

## Procedure

1. Define a label for Date-Time that differentiates it from other components in the content tree.  
   A descriptive label makes finding the component easier in a large list of components. For instructions on using the content tree, see [Manage UI pages and page variants](https://www.servicenow.com/docs/Hq7OFdFRjvDFnNsfdtsMGw "Learn what a page is in UI Builder. Understand the building blocks of a UI Builder page, such as column layouts and components.") .
2. Select the Date-time component, using one of these methods:
   * Click anywhere within the component.
   * Select the Date-time label you created for your component in the content tree.

   {#date-time-component-uib-setup__choice_u7i_eek_w9a}  
   The preset selection panel appears in the pane on the right.
3. Select either None to configure the component properties manually, or select one of the available presets to use pre-configured properties and events for the component.  
   When you select the first preset on a page, a configuration panel appears with instructions for configuring the required controller for that preset. For more information, see [Automatically configure components using presets](https://www.servicenow.com/docs/eFRoznvnJXSEND1RjAXpSg#presets "Use component presets to automatically configure components on compatible pages.")
4. Supply the data that connects a preset to its controller and select Use.  
   UI Builder automatically configures any other presets in the page to use the same controller with the same configuration. For more information, see [Add a controller](https://www.servicenow.com/docs/P52VaYAm9py9PHh7UM81~A#add-controller "Add a data controller to your page to use component presets.").
{#date-time-component-uib-setup__steps_j1l_cdw_rnb}

## Date-Time component properties {#ariaid-title2}

Configure the properties that define a date and time for
this component.
Presets are intended to suit a specific use case. However, you can override a property that has a preset value with a custom configuration if necessary for your design. For details on overriding and resetting presets, see [Override a component preset](https://www.servicenow.com/docs/eFRoznvnJXSEND1RjAXpSg#override-a-preset "Override a component preset to enter your own custom values.").  
Important:  
Preset values that you override aren't updated automatically when you upgrade the instance.

### Available presets {#date-time-config-properties__section__k3d_ttk_f1c}

Schedule run start date
:   This preset requires the Data Manager Policy Form
    controller.  
    Properties included in this preset are:

    * Component visibility (size, type, disabled, read only, auto-focus, field layout configuration)
    * Value
    * Label
    * Validation
    * Format
    * Picker
    * Accessibility
    {#date-time-config-properties__ul_nxw_prt_dcc}

Schedule run time datetime
:   This preset requires the Data Manager Policy Form
    controller.  
    Properties included in this preset are:

    * Component visibility (size, type, disabled, read only, auto-focus, field layout configuration)
    * Value
    * Label
    * Validation
    * Format
    * Accessibility
{#date-time-config-properties__dl_evn_nlt_dcc}

### Properties {#date-time-config-properties__section_a3b_hrt_dcc}

{#date-time-config-properties__table-uib-prop-labels__entry__2}

| Label \[property\] | Description |
|-|-|
| Size \[size\] | Sets the input text size. The choices are small or medium. Default: medium |
| Type \[type\] | Type of calendar to use with the form field. The choices are: * Date * Date-time * Time * Month * Year * Quarter * Week-year {#date-time-config-properties__ul_svt_z2l_f1c} Note: The selection of a calendar type can change the properties available for configuration. |
| Disabled \[disabled\] | Disables the input field to prevent the user from interacting with it or changing its value. Default: false |
| Read only \[readonly\] | Makes the input field read-only to prevent users from modifying the value. Default: false |
| Auto-focus \[autofocus\] | Automatically puts focus in the input field when the page loads. Default: false |
| Field layout configuration \[fieldLayout\] | Sets the input field layout. Vertical displays the label above the input field and horizontal displays the label in line with the input field. |
[ ]

{#date-time-config-properties__table-uib-prop-labels} {#date-time-config-properties__table_r15_2yb_4fc__entry__2}

| Label \[property\] | Description |
|-|-|
| Value \[value\] | Value of the input field. Unless the input field has pre-populated data, leave this property empty. |
| Manage value \[manageValue\] | If set to true, overrides automatic updates to the Value property. Use the Date time value set event to intercept the requested change and handle it manually. Default: false. |
| Placeholder text \[placeholder\] | Placeholder text for the input field that helps the user understand what input is expected. |
| Identifier \[name\] | Name of the input field. This value is dispatched with the event when a user interacts with the field. |
| Text align \[align\] | Text alignment of input field value. The choices are start, center, and end. |
[Table 1. Value]

{#date-time-config-properties__table_r15_2yb_4fc} {#date-time-config-properties__table_k11_hyb_4fc__entry__2}

| Label \[property\] | Description |
|-|-|
| Label \[label\] | Label describing the overall purpose of the input field. Default: Select date |
| Wrap label \[wrapLabel\] | If the label doesn't fit on one line, wraps the label. |
| Required \[required\] | Indicates whether or not the input field is a required field. Default: false |
| Hide required indicator \[hideRequiredIndicator\] | Shows or hides the required indicator on the input field. Use this for forms where most fields are required, together with the "optional" flag for any fields that are not required. Default: false Note: This property is available when the Type property is set to Time. |
| Optional \[optional\] | Indicates that the input field is optional. Default: false |
| Helper content \[helperContent\] | Provides additional hint text for the user, such as password requirements or other instructions for setting the field. When you provide content in this field, an iconic button appears next to the field label to trigger a popover containing the content. Use plain text to allow for translation. If you do not want to add helper content, leave this property empty. |
[Table 2. Label]

{#date-time-config-properties__table_k11_hyb_4fc} {#date-time-config-properties__table_n3t_3yb_4fc__entry__2}

| Label \[property\] | Description |
|-|-|
| Invalid \[invalid\] | Enables the input field to indicate when it's in an incorrect state. This state is reflected in the field display. Default: false |
| Manage invalid \[manageInvalid\] | If set to true, overrides automatic updates to the Invalid property. Use the Date time invalid set event to intercept the requested change and handle it manually. Default: false. |
| Alert messages \[messages\] | Array of alert messages that display below the field. The following list describes each object's properties: * `content`: The text of the alert message. * `status`: The type of alert to display. * `icon`: Icon to display at the start of the alert message. {#date-time-config-properties__ul_swq_2jh_b3c} Default: { "name": "content", "label": "Content", "fieldType": "string", "translatable": true }, { "name": "status", "label": "Status", "fieldType": "choice", "typeMetadata": { "choices": [ { "label": "Critical", "value": "critical" }, { "label": "Warning", "value": "warning" }, { "label": "Positive", "value": "positive" }, { "label": "Info", "value": "info" }, { "label": "Suggestion", "value": "suggestion" } ] } }, { "name": "icon", "label": "Icon", "fieldType": "icon" } |
[Table 3. Validation]

{#date-time-config-properties__table_n3t_3yb_4fc} {#date-time-config-properties__table_bb3_kyb_4fc__entry__2}

| Label \[property\] | Description |
|-|-|
| Format pattern \[format\] | Format used for the date and time input value, based on the Unicode Technical Standard (UTS). An example of a date format is dd/mm/yyyy, and an example of a time format is hh:mm:ss. A time zone token (z) can be added to enable time zones in an hh:mm:ss z format. |
[Table 4. Format]

{#date-time-config-properties__table_bb3_kyb_4fc} {#date-time-config-properties__table_p4d_nyb_4fc__entry__2}

| Label \[property\] | Description |
|-|-|
| Opened \[opened\] | Indicates if the calendar is open (true) or closed (false). Default: false |
| Manage opened \[manageOpened\] | If set to true, overrides automatic updates to the Opened property. Use the Date time opened set event to intercept the requested change and handle it manually. Default: false. |
| Show default footer actions showDefaultFooterActions | Shows the default footer actions in the component. The footerActions property overrides this property. Default: false Note: This property is available when the Type property is set to Month, Year, Quarter, or Week-year. |
| Default footer action labels \[defaultFooterActionLabels\] | Custom names for default footer action buttons. |
| Footer actions \[footerActions\] | Array of objects that define the buttons that appear in the calendar footer. You can define up to two buttons, set from right to left. The following list describes each object's properties: * `label`: Text displayed on the button. * `variant`: Visual style of the button. * `tooltipContent`: Tooltip text that displays when the user hovers over the button. * `clickActionType`: Type of action to trigger when the button is selected. * `disabled`: Disables the button. * `bare`: Applies the bare button style. * `size`: Size of the button. * `configAria`: Defines ARIA attributes for the button. * `closeCalendar`: Determines whether selecting the button closes the calendar. {#date-time-config-properties__ul_swq_2jh_b3c_asdf} Default: { "name": "label", "label": "Label", "fieldType": "string" }, { "name": "variant", "label": "Variant", "fieldType": "string" }, { "name": "tooltipContent", "label": "Tooltip content", "fieldType": "string" }, { "name": "clickActionType", "label": "Click action type", "fieldType": "string" }, { "name": "disabled", "label": "Disabled", "fieldType": "boolean" }, { "name": "bare", "label": "Bare", "fieldType": "boolean" }, { "name": "size", "label": "Size", "fieldType": "string" }, { "name": "configAria", "label": "Config aria", "fieldType": "json" }, { "name": "closeCalendar", "label": "Close calendar", "fieldType": "boolean" } |
| Hide footer \[hideFooter\] | Hides the footer in the calendar panel. Default: false |
| Hide adjacent months \[hideAdjacentDates\] | Hides dates outside the displayed month interval when set to true. Default: false Note: This property is available when the Type property is set to Date or Date-time. |
| Panel fit props \[panelFitProps\] | Keys to set to configure the calendar picker. Use these keys to position and scale the panel relative to the panel target. Valid keys: * position: Array of possible positions in which to place the panel relative to its target. Choices are: \["bottom-start top-start","top-start bottom-start","bottom-end top-end","top-end bottom-end"\] * offset: Number of pixels to offset the panel from its associated trigger. {#date-time-config-properties__ul_rsn_sfv_g1c} |
| Day of week headings \[weekdayHeadings\] | Sets the length of the weekday headings. Valid values: * short: Two-character headings, such as, Su, Mo, Tu, We, and Th * narrow: One-character headings, such as, S, M, T, W, and T {#date-time-config-properties__ul_vqs_cgv_g1c} Note: This property is hidden when the Type property is set to Month, Year, or Quarter. |
| First day of week \[firstDayOfWeek\] | Sets the first day of the week on the calendar panel. The value can range from 0 (Sunday) to 6 (Saturday). The value in this property only applies when the value in the Format pattern property is set to a day or week pattern, and the Type property is set to Date or Date-time. Note: This property is hidden when the Type property is set to Month, Year, or Quarter. |
| Disable weekends \[disableWeekends\] | Disables weekend days for the Date calendar type. The actual values used are determined by the Weekend days property. Default: false Note: This property is hidden when the Type property is set to Month, Year, or Quarter. |
| Weekend days \[weekendDays\] | Sets which days are weekend days. Defaults: 0 (Sunday) and 6 (Saturday). Note: This property is hidden when the Type property is set to Month, Year, or Quarter. |
| Default time \[initialTime\] | Configures the initial time for the date-time format. If a start time isn't configured, the time defaults to midnight of the same day. Note: This property is available when the Type property is set to Date-time. |
| Disabled items \[disabledItems\] | An array of objects representing disabled dates. String values must be date strings matching those defined in the Format pattern property. Valid values: * Value: An example of a value is:`{value: "2020/01/01"}` * Interval: An example of an interval is:`{start: "2020/01/01", end: "2020/12/31"}` * Before-interval: An example a before interval is: `{before: "2020/01/01"}` * After-interval: An example of an after interval is: `{after: "2020/01/01"}` {#date-time-config-properties__ul_u4f_s3v_g1c} |
[Table 5. Picker]

{#date-time-config-properties__table_p4d_nyb_4fc} {#date-time-config-properties__table_ng2_qyb_4fc__entry__2}

| Label \[property\] | Description |
|-|-|
| ARIA properties \[configAria\] | Object whose keys reference a specific HTML element within the component. The value of each key is an object that contains ARIA properties and corresponding values. These ARIA properties are set on the specified element. See <https://www.w3.org/> for properties and accepted values. |
[Table 6. Accessibility]

{#date-time-config-properties__table_ng2_qyb_4fc}

### Manual configuration {#date-time-config-properties__section_jwl_2rt_dcc}

To configure the properties manually, enter either static or dynamic input. Enter dynamic input by selecting the input type.

* Data binding: Enables you to create dynamic property values derived from multiple sources, such as state variables (@state) in the page, URL variables (@context), or payloads from a data resource (@data). For details, see [Add and configure data resources to a
  page](https://www.servicenow.com/docs/~B53KgSqh6jyRj9wmzg8LA "Add data resources to dynamically expose data from tables, records, or other elements on your page in UI Builder.") .
* Scripting: Creates a scripted property value. For details on scripted values, see [Create and bind a client state parameter to a component](https://www.servicenow.com/docs/JxkxcsWDJlkywLr4rc~p8A "Create and bind a client state parameter value to a component in UI Builder. By adding custom values to your components, these components can then be automatically updated through a script.") .
{#date-time-config-properties__ul_azs_ylt_dcc}

## Date-Time component events {#ariaid-title3}

Select event handlers to configure the events provided with the Date-Time component. Event handlers work with data resources to link the Date-Time actions to the data you want to display to your users.
The Events tab shows the events used by the Date-Time component. To view the available events, select + Add event mapping. Select the event in the list to add one or more event handlers.

### Event handlers {#date_time_config_events__section_nmd_cwv_g1c}

Event handlers work with data resources to link the Date-Time actions to the data you want to display to your users. Select the event in the list to add one or more event handlers.

For instructions on adding event handlers to an event, see [Configure an event handler](https://www.servicenow.com/docs/8s23OEG1s5oowl~vaOUlLw "Add an event handler to a page, component, data resource, or declarative action within UI Builder so that your user can trigger an action.").

### Event descriptions {#date_time_config_events__section_rmd_cwv_g1c}

{#date_time_config_events__table_smd_cwv_g1c__entry__2}

| Event | Description |
|-|-|
| Date time invalid set \[NOW_DATE_TIME#INVALID_SET\] | The user moves focus away from the field. Payload: * name (string) * value (boolean) Value of the `invalid` property, which is based on the values of the `required` and `format` properties. * fieldValue (string) * type (string) * format (string) {#date_time_config_events__ul_jz1_mt1_h1c} |
| Date time value set \[NOW_DATE_TIME#VALUE_SET\] | The user moves focus away from the field, and the value is valid. Payload: * name (string) * value (string) * format (string) * type (string) * date (date) * isoDate (string) {#date_time_config_events__ul_vwg_st1_h1c} |
| Date time input \[NOW_DATE_TIME#INPUT\] | The user enters data in a field by typing or pasting text. The system does not validate the content or update the `value` property. Payload: * name (string) * data (string) Value entered in the field that caused the event to occur. * fieldValue (string) Current value of the field when the event occurred. {#date_time_config_events__ul_ejd_b51_h1c} |
| Date time enter keydown \[NOW_DATE_TIME#ENTER_KEYDOWN\] | The user presses the Enter key while focus is inside the input field. Payload: * name (string) * fieldValue (string) * type (string) {#date_time_config_events__ul_fvf_f51_h1c} |
| Date time opened set \[NOW_DATE_TIME#OPENED_SET\] | Automatically updates when the user opens or closes the visual calendar picker. Payload: value (boolean) |
| Date time items set \[NOW_DATE_TIME#ITEMS_SET\] | The user sets the component's visual date items. The payload is an array containing one or more arrays, each representing a row on the date grid. Each row contains items corresponding to a given date item. Payload: value (JSON) Contains these properties: * date (object) * label (string) * a11yLabel (string) * adjacent (boolean) * now (boolean) * selected (boolean) * range (boolean) * tween (boolean) * disabled (boolean) * id (string) {#date_time_config_events__ul_q1b_fv1_h1c} |
| Date time footer action clicked \[NOW_DATE_TIME#FOOTER_ACTION_CLICKED\] | The user selects a footer action item. The payload includes a reference to the selected item and action. Payload: action (JSON) * variant (string) * label (string) * bare (boolean) * disabled (boolean) * tooltipContent (string) * clickActionType (string) {#date_time_config_events__ul_p4f_sv1_h1c} |
[ ]

{#date_time_config_events__table_smd_cwv_g1c}

