> For the complete documentation index, see [llms.txt](https://docs.altu.d1.cx/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.altu.d1.cx/build/assistentes/builder/componentes/input/date.md).

# Data

Precisa solicitar uma data para o usuário? Com essa mascara você pode.

Para configurar, acesse a aba input e em seguida selecione a opção Data no ícone `?`

![](/files/34qnRYsfLZJzu3RMi1bW)

### Estrutura

```json
{
    "default": {
        "type": "date",
        "payload": {
            "allowInput": false
        }
    }
}
```

#### Atributos

* **type:** date
* **payload:**
  * **max (opcional):** range de data máxima permitida (YYYY-MM-DD).
  * **min (opcional):** range de data mínima permitida (YYYY-MM-DD).
  * **default (opcional):** data que será setada no campo assim que o componente aparecer (YYYY-MM-DD).
  * **weekends (default: true):** se `false`, não aceitará data cujo dia esteja em um final de semana.
  * **allowInput (default: true):** se `false`, irá travar o `input` do usuário. Obs.: funcional apenas no Widget.

‌

Como visto acima, na especificação de Atributos, não há um que seja obrigatório. Portanto, mesmo que seja declarado um `payload` vazio, ainda ocorrerá uma validação, que decidirá se a data é válida ou não.

A validação do `input` que é passado para o builder possui um valor boolean (true ou false).

```
{
        "valid": true|false,
        "text": "Data digitada pelo usuário 'as is'",
        "value": "Data formatada no padrão ISO 8601: YYYY-MM-DD"
    }
```

### **Exemplo**

{% tabs %}
{% tab title="Exemplo" %}

```json
{
    "default": {
        "type": "date",
        "payload": {
            "max": "2020-12-31",
            "min": "2000-09-30",
            "default": "2020-12-31",
            "weekends": false,
            "allowInput": false
        }
    }
}
```

{% endtab %}

{% tab title="widget" %}
![](/files/-MJcDkgk1DEPAMyxd0yj)
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.altu.d1.cx/build/assistentes/builder/componentes/input/date.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
