Date Picker

A component for rendering date picker inputs with range and presets.

In this guide, you'll learn how to use the Date Picker component.

Was this example helpful?

Usage#

Code
import { DatePicker } from "@medusajs/ui"
Code
<DatePicker />

API Reference#


Examples#

Controlled Date Picker#

Manage and store the value of the date picker in a state variable for controlled behavior. This is also useful for form integration.

Was this example helpful?

Date Picker With Time#

Enable time selection with different granularity levels for precise scheduling.

Was this example helpful?

Date Picker Min/Max Values#

Restrict date selection to a specific range by setting minimum and maximum values.

In the example below, you can only select dates within the next 30 days. Dates outside the range are disabled.

Was this example helpful?

Date Picker Disabled Dates#

Disable specific dates like weekends and holidays to prevent selection of unavailable dates.

The example below disables weekends and holidays like Christmas.

Was this example helpful?

Date Picker Granularity Options#

Different levels of time precision from date-only to second-precision selection.

Was this example helpful?

Date Picker Form Integration#

The following example shows how to use the date picker in a form, with simulated form submission.

Was this guide helpful?
Ask Bloom
For assistance in your development, use Claude Code Plugins or Medusa MCP server in Cursor, VSCode, etc...FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break