Skip to main content

DatePicker

Calendar-based date selector with support for single date, date range, and time selection.

Import​

import { DatePicker } from '@scaffald/ui';

Basic Usage​

Live Preview
<ThemeProvider initialTheme="light">
<Text>DatePicker renders a calendar-based date selector with month navigation, day grid, and optional time input. See props documentation for configuration.</Text>
</ThemeProvider>

Props​

See the TypeScript definitions for the complete props API.

Common Props​

All DatePicker components accept standard React Native View props.

Examples​

// Single date selection
<DatePicker
value={selectedDate}
onChange={(date) => setSelectedDate(date)}
placeholder="Select a date"
/>

// Date range selection
<DatePicker
mode="range"
startDate={startDate}
endDate={endDate}
onChange={({ start, end }) => {
setStartDate(start);
setEndDate(end);
}}
/>

Accessibility​

  • Keyboard navigation support
  • Screen reader compatible
  • ARIA attributes included
  • Focus management

Design Tokens​

This component uses the following design tokens:

  • Colors: colors.{semantic}.{theme}.{variant}
  • Spacing: spacing.*
  • Typography: typography.*

See Design Tokens for more information.

Changelog​

See GitHub Releases for version history.