# Date Picker Standard 5 - Date picker with natural language

> Calendar with shortcut buttons for Today, Tomorrow, and relative day labels.

A shadcn/ui block from the [@shadcnblocks](https://shadcnblocks.com) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/shadcnblocks/date-picker-date-picker-standard-5).

- Page, with a live preview: https://shadcn.exchange/r/shadcnblocks/date-picker-date-picker-standard-5
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/shadcnblocks/date-picker-date-picker-standard-5-light-58427e448a137a22.png
- Registry item: https://shadcnblocks.com/r/date-picker-date-picker-standard-5.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://shadcnblocks.com/r/date-picker-date-picker-standard-5.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- npm packages: `cn`, `date-fns`, `lucide-react`
- Registry items: `button`, `calendar`, `popover`, `scroll-area`

## Files

### `example/date-picker/date-picker-standard-5.tsx`

```tsx
"use client";

import { format } from "date-fns";
import { CalendarIcon } from "lucide-react";
import { useState } from "react";
import { cn } from "cn";

import { Button } from "@/components/ui/button";
import { Calendar } from "@/components/ui/calendar";
import {
  Popover,
  PopoverContent,
  PopoverTrigger,
} from "@/components/ui/popover";
import { ScrollArea } from "@/components/ui/scroll-area";

export const title = "Date Picker with Natural Language";

const Example = () => {
  const [date, setDate] = useState<Date | undefined>(new Date());

  const shortcuts = [
    { label: "Today", date: new Date() },
    {
      label: "Tomorrow",
      date: new Date(new Date().setDate(new Date().getDate() + 1)),
    },
    {
      label: "In 3 days",
      date: new Date(new Date().setDate(new Date().getDate() + 3)),
    },
    {
      label: "In a week",
      date: new Date(new Date().setDate(new Date().getDate() + 7)),
    },
    {
      label: "In 2 weeks",
      date: new Date(new Date().setDate(new Date().getDate() + 14)),
    },
    {
      label: "In a month",
      date: new Date(new Date().setMonth(new Date().getMonth() + 1)),
    },
  ];

  return (
    <Popover>
      <PopoverTrigger asChild>
        <Button
          className={cn(
            "w-[280px] justify-start text-left font-normal",
            !date && "text-muted-foreground",
          )}
          variant="outline"
        >
          <CalendarIcon className="mr-2 h-4 w-4" />
          {date ? format(date, "PPP") : <span>Pick a date</span>}
        </Button>
      </PopoverTrigger>
      <PopoverContent align="start" className="w-auto p-0">
        <div className="flex divide-x overflow-hidden bg-background">
          <Calendar mode="single" onSelect={setDate} selected={date} />
          <div className="relative w-[249px] overflow-hidden">
            <div className="absolute inset-0 grid gap-4">
              <div className="space-y-2 px-4 pt-4">
                <p className="text-center text-sm font-medium">Quick Select</p>
              </div>
              <ScrollArea className="h-full overflow-y-auto">
                <div className="grid grid-cols-1 gap-2 px-4 pb-4">
                  {shortcuts.map((shortcut) => (
                    <Button
                      key={shortcut.label}
                      onClick={() => setDate(new Date(shortcut.date))}
                      size="sm"
                      variant="outline"
                    >
                      {shortcut.label}
                    </Button>
                  ))}
                </div>
              </ScrollArea>
            </div>
          </div>
        </div>
      </PopoverContent>
    </Popover>
  );
};

export default Example;
```
