DatePicker
Input field with calendar popover for selecting dates.
Installation
# Install @opencosmos/ui to use DatePicker
pnpm add @opencosmos/uiPreview
Loading preview...
Customize
— Placeholder text
— Disable the date picker
Usage
Import
import { DatePicker } from '@opencosmos/ui';Example
<DatePicker>
Content
</DatePicker>Eject
Copy this component into your project for full customization
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| placeholder | text | "Pick a date" | Placeholder text |
| disabled | boolean | false | Disable the date picker |
Code Examples
Basic Usage
Date input with calendar
import { DatePicker } from "@opencosmos/ui"
<DatePicker
date={date}
onDateChange={setDate}
placeholder="Pick a date"
/>