Skip to content
BigBang

Popular

    ↑↓Navigate↵OpenEscClose
    TR

    Components

    DatePicker

    A date field typed into day, month and year segments or picked from a calendar popup.

    Storybook
    Storybook
    Source
    Source

    DatePicker is for a single date in a form: a start date, a due date, a birth date. Users can type the date or pick it from the calendar.

    DDMMYYYY

    Type the day, month and year, or pick from the calendar.

    import { DatePicker, Provider } from '@bigbang/ui';
    export default function Default() {
    return (
    <Provider locale="en-GB">
    <DatePicker label="Date" description="Type the day, month and year, or pick from the calendar." className="max-w-xs" />
    </Provider>
    );
    }
    1. Label: Names the group of segments.
    2. Segments: Day, month, year; placeholders while empty (DD, MM, YYYY).
    3. Calendar button: Opens the calendar popup.
    4. Calendar popup: The same grid as Calendar.
    5. Description and error: Under the field.
    • Typing digits fills a segment; when it is full, focus moves on. Typing a separator moves on too.
    • Arrows step a segment up and down and wrap at the ends. Backspace clears a segment and goes back from an empty one.
    • A day past the month’s last day is moved to the last day (31/02 → 28/02).
    • A typed date outside min, max or isDateUnavailable shows a built-in message.
    • Picking a day closes the popup and returns focus to the calendar button.
    • Do not explain the format in the description; the placeholders show it.
    • For far dates such as birth dates users type; the calendar is optional.
    • State limits in text too.
    Turkish English
    Takvimi aç Open calendar
    GG / AA / YYYY DD / MM / YYYY
    {min} ile {max} arasında bir tarih seçin Choose a date from {min} to {max}
    Bu tarih seçilemez This date is not available