# Calendar

The `Calendar` component is a date field component that allows users to enter and edit dates. It leverages the `react-day-picker` library.

### Preview

<div align="left"><figure><img src="/files/lowcPWS7zcRYPF6lpAMp" alt="Gravity calendar component" width="354"><figcaption></figcaption></figure></div>

### Usage

```javascript
import { Calendar } from 'components/lib';

function MyComponent({ ...props }) {
  return (
    <Calendar />
  );
}
```

### Props

| Prop            | Description                         | Required | Value                  |
| --------------- | ----------------------------------- | -------- | ---------------------- |
| className       | custom styling                      | optional | SCSS or Tailwind       |
| classNames      | classes passed to the day picker    | optional | SCSS or Tailwind       |
| showOutsideDays | show days outside the current month | optional | boolean, default: true |

### Notes

* The `Calendar` component uses the `DayPicker` from `react-day-picker`.
* The `className` prop allows custom styling to be applied.
* The `classNames` prop allows for custom classes to be passed to the day picker.
* The `showOutsideDays` prop determines whether days outside the current month are shown.
* The `components` prop is used to customise the left and right navigation icons.
* See the [Shadcn Calendar docs](https://ui.shadcn.com/docs/components/calendar) for more information


---

# 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.usegravity.app/gravity-web/components/calendar.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.
