> For the complete documentation index, see [llms.txt](https://docs.pentaho.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pentaho.com/pba/10.2-analytics/pentaho-dashboard-designer-cp/advanced-topics/use-prompts-on-dashboards/other-prompt-types/creating-a-date-prompt.md).

# Creating a date prompt

The date picker prompt allows users to select values based on calendar dates. When creating a date picker prompt, you will need to set a date format which the user will select using the date picker prompt. By default, the format used is yyyy-MM-dd.

The date picker prompt uses [Dojo date formats](https://dojotoolkit.org/reference-guide/1.9/dojo/date/locale/format.html). In the past, this component was based on the [JQuery Date Picker](http://api.jqueryui.com/datepicker/), and to support legacy formats, the old formats will be converted automatically.

Not all formats are supported or make sense when a date is selected. For instance, anything with less granularity than a unit of 'day' will default to the Dojo format, so we encourage you to use any format from 'd' to 'y' which is currently supported by the date picker control type. You can use any desired configuration where 'yyyy-MM-dd', 'yy-M-d' or 'd/MM/yyyy' is a valid format.

As a result the pattern can be any combinations of the following patterns of years, quarters, months and days:

| Pattern     | Description                     | Example Date: Monday, January 4, 2016 |
| ----------- | ------------------------------- | ------------------------------------- |
| G           | era                             | AD                                    |
| y or yy     | year (two digit)                | 16                                    |
| yyy or yyyy | year (four digit)               | 2016                                  |
| q or Q      | quarter (one digit)             | 1                                     |
| M           | month numeric (no leading zero) | 1                                     |
| MM          | month numeric (two digit)       | 01                                    |
| MMM         | month name short                | Jan                                   |
| MMMM        | month name long                 | January                               |
| d           | day of month (no leading zero)  | 4                                     |
| dd          | day of month (two digit)        | 04                                    |
| D           | day of the year                 | 4                                     |
| E           | day of the week                 | 2                                     |


---

# 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.pentaho.com/pba/10.2-analytics/pentaho-dashboard-designer-cp/advanced-topics/use-prompts-on-dashboards/other-prompt-types/creating-a-date-prompt.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.
