# DatePicker

This component is used to select a date.

## Installation

```tsx
import {DatePicker} from 'uxp/components';
```

## Examples

```tsx
<DatePicker
   title="Date"
   date={date}
   onChange={(date) => setDate(date)}
/>
```

```tsx
<DatePicker
    title="Date"
    date={date}
    onChange={(date) => setDate(date)}
    options={{
        disableWeekEnds: true
    }}
/>
```

## Properties

| Name              | Type                                                          | Description                                                                                                                                |
| ----------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| title             | string                                                        | The title                                                                                                                                  |
| date              | string \| Date                                                | The currently selected date. Either a Date object or an ISO8601 string representation of a date                                            |
| onChange          | (date: Date) => void                                          | Callback that gets executed whenever a date is selected/changed in the date picker                                                         |
| closeOnSelect     | boolean                                                       | Called when the calendar popup is closed                                                                                                   |
| options           | [IDatePickerOptions](/uxp/stable/types/idatepickeroptions.md) | Additional options to control behavior                                                                                                     |
| disableInput      | boolean                                                       | Set to true to prevent a user from typing in a date                                                                                        |
| hideLabels        | boolean                                                       | this will hide the labels in the placeholder (calendar icon)                                                                               |
| hideInput         | boolean                                                       | hide the input box                                                                                                                         |
| showFullMonthName | boolean                                                       | show the full month name in the month selector dropdown default is true if value is false it will show the short name "Jan" ,"Feb" and ect |

### title

***

The title

| type   |
| ------ |
| string |

### date

***

The currently selected date. Either a Date object or an ISO8601 string representation of a date

| type           |
| -------------- |
| string \| Date |

### onChange

***

Callback that gets executed whenever a date is selected/changed in the date picker

| type                 |
| -------------------- |
| (date: Date) => void |

### closeOnSelect

***

Called when the calendar popup is closed

| type    |
| ------- |
| boolean |

### options

***

Additional options to control behavior

| type                                                          |
| ------------------------------------------------------------- |
| [IDatePickerOptions](/uxp/stable/types/idatepickeroptions.md) |

### disableInput

***

Set to true to prevent a user from typing in a date

| type    |
| ------- |
| boolean |

### hideLabels

***

this will hide the labels in the placeholder (calendar icon)

| type    |
| ------- |
| boolean |

### hideInput

***

hide the input box

| type    |
| ------- |
| boolean |

### showFullMonthName

***

show the full month name in the month selector dropdown default is true

if value is false it will show the short name "Jan" ,"Feb" and ect

| type    |
| ------- |
| boolean |


---

# 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://help.iviva.com/uxp/stable/components/datepicker.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.
