# Date Time Range Widget

In Date Time Range widget, user has two options of Range Type.

1. Absolute - Here, user can select specific start date and end date using calender.
2. Relative - Here, user can provide interval like days, months, weeks etc. This can be used to check history data. For example, data of last 3 weeks starting from current time.

**General Setting**

User can change following things in Date Time Range widget:

* Name for widget which will be used data reference. For Example, if widget name is 'Date Time Range', then data of widget is referenced as Data Time Range.startDate and Data Time Range.endDate
* Show title - User can show/hide widget title
* Title Color
* Background Color

![Configure Date Time Range Widget](/files/BvMs8AVuJwGZWRS4LSda)

#### Source <a href="#source" id="source"></a>

Date Time Range widget does not support Source settings.

#### Widget Setting

In Widget Setting option, user can change following parameters:

* Date Format - User can define any Date Format here. For example, dd/MM/yyyy HH:mm:ss.

![Configure Date Time Range Widget](/files/cVcADb1KoQhSrA6Db6yh)

#### Event Handling

Date Time Range widget does not support Event handling.

#### Example

Test Case 1:

If user want to fetch data using Action which requires startTime and endTime as parameter and show it to Table Widget. So following are the steps to perform this operation and are as follows.

1. Add Table Widget to dashboard and change its color, background color, file name as per requirement.
2. Now go to **Source** tab of Table Widget, and select mode as Action, and select a required ActionID from dropdown.
3. Now, in Action Parameter, select parameter as **Date Time Range.startDate** and set Key as **startTime,** and enable **Reload On Change operation.**
4. Similarly,  select parameter as **Date Time Range.endDate** and set Key as end**Time,** and enable **Reload On Change operation.**
5. It will send JSON object to given ActionID as shown in below block. And received response of action will get shown in table.

```
// JSON Object

// Date Format will be as per user input
// If not given by user, default Date Format will be 'dd/mm/yyyy'

{
    "startTime":<selected_startDate>,  
    endTime":<selected_endDate>
}
```

![Configure Date Time Range Widget](/files/wwvpV30wa8ZTc7rTvXX9)

![Configure Date Time Range Widget](/files/zjmItqAmLHPZto1NH4Le)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.thingsup.io/widgets/date-time-range-widget.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
