Time

Updated at:
Copy as MD

The time component lets you input and select time data. This topic describes its configuration.

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. In the search box above the component list, enter Time and drag the component onto the canvas.

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

    In the Components panel on the left, search for and select the Time component, and then drag it to the canvas. In the Styles panel on the right, you can configure properties such as the component's position, size, name, visibility, opacity, theme color (for example, #0066FF), time unit (for example, day), and whether to enable default time.

Step 2: Configure styles

  1. In the Styles panel on the right, configure the display style properties.
    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 time unit. Options include second, day, month, and year.
    Default time Sets the initial time that the component displays.

    The page load time serves as the baseline (0). You can set an offset by adding or subtracting time. For example, to set the default time to the current day, select day as the time unit and set the default time to current time +0 days.

  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.