Appearance
DatePicker
Ô ngày form: Calendar trong Popover (desktop) hoặc Sheet (mobile).
ts
import { DatePicker } from "@minap/ui";Sample
Props / API
| Prop / API | Type | Default | Notes |
|---|---|---|---|
value / onChange | Date | undefined | — | Selection controlled |
placeholder | string | Pick a date | Nhãn khi trigger trống |
formatDisplay | (date: Date) => string | format(date, "PPP") | Chỉ hiển thị trên trigger |
iconPosition | "start" | "end" | "end" | Icon tùy chỉnh; ẩn indicator/chevron UA trên native |
surface | "auto" | "popover" | "sheet" | "auto" | Chỉ overlay picker; auto = Sheet trên mobile |
control | "auto" | "picker" | "native" | "auto" | auto = native trong RN WebView; ngược lại dùng kit picker |
disabled | boolean | false | |
id / className / aria-label | string | — | Liên kết FormField |
Behavior
- control auto/picker/native
- native: ẩn chrome calendar UA qua @minap/ui native-temporal.css
- useIsMobile Sheet vs Popover
- h-touch trigger
- formatDisplay
- iconPosition
Related
- Category:
forms-inputs - Catalog gallery:
/catalog/forms-inputs