Time range

Updated at:
Copy as MD

The Time Range component lets you select a time range by specifying a start and end time.

Step 1: Add the component

  1. Create a web application. For more information, see Create a web application.

  2. In the web application editor, click the component icon 组件 on the far left.

  3. Above the component list on the left, enter Time Range to find the component. Then, drag the component to the canvas.

    For more information about adding components, see Add a component.

    In the Style panel on the right, you can configure properties such as Position, Size, Name, Visibility, opacity, theme color (default is #0066FF), time unit (for example, Day), and default time.

Step 2: Configure the style

  1. In the Style panel on the right, configure the display style of the component.
    Parameter Description
    Theme color
    Sets the theme color for the input box. This color applies to the component's main text and time selection controls.
    Time unit Sets the selectable time unit. Supports time granularity in seconds or days.
    Default time Select this checkbox to set a default start and end time.

    This feature uses the page load time as a reference point. You can set time offsets relative to this point. For example, to set the start time to seven days before the page loads and the end time to one day after, set the time unit to Day, the start time to Current Time -7 days, and the end time to Current Time +1 day.

  2. Adjust the component's position on the page. For more information about general component style settings, see Configure styles.

Step 3: Configure interactions

  1. Select the Interactions tab of the component to configure events and actions. For more information, see Interaction configuration.
    For example, you can configure an event so that when the component's value changes, it triggers the Refresh component action to update the data displayed in another component.
  2. Click Preview in the upper-right corner of the page to preview and debug the component's data and appearance.