---
url: /reference/api/logger/prompts.Variable.date.md
---
# Variable: date

```ts twoslash
// @include: imports
const date: (opts) => Promise<Date | typeof CANCEL_SYMBOL>;
```

Defined in: node\_modules/.pnpm/@clack+prompts@1.9.0/node\_modules/@clack/prompts/dist/index.d.mts:401

The `date` prompt provides an interactive date picker, allowing users
to navigate between year, month, and day segments and
increment/decrement values using keyboard controls.

## Parameters

`opts`

[`DateOptions`](prompts.Interface.DateOptions.md)

## Returns

`Promise`<`Date` | *typeof* [`CANCEL_SYMBOL`](prompts.Variable.CANCEL_SYMBOL.md)>

## See

https://bomb.sh/docs/clack/packages/prompts/#date-input

## Example

```ts twoslash
// @include: imports
import { date } from "@clack/prompts";

const birthday = await date({
  message: "Pick your birthday",
  minDate: new Date("1900-01-01"),
  initialValue: new Date(),
  maxDate: new Date(),
});
```
