Shadix UIShadix UI

DateTimePicker Input

A customizable date and time picker input component for shadcn/ui. Provides an intuitive interface for selecting dates and times.

Installation

GitHub
pnpm add shadcn@latest add @shadix-ui/datetimepicker-input

Usage

Import the component

import { DateTimePickerInput } from '@/components/ui/datetimepicker-input';

Basic Usage

const DateTimePickerInputDemo = () => {
    return (
        <DateTimePickerInput
            mode="single"
            value={new Date()}
            onValueChange={(date) => {
                console.log(date);
            }}
            placeholder="Select date"
        />
    );
};

With Range Mode

const DateTimePickerDemo = () => {
    return (
        <DateTimePickerInput
            mode="range"
            onValueChange={(date) => {
                console.log(date);
            }}
            placeholder="Select date range"
        />
    );
};

With Time Mode

const DateTimePickerDemo = () => {
    return (
        <DateTimePickerInput
            mode="single"
            enableTime={true}
            timeFormat="24h" // 12h or 24h
            value={new Date()}
            onValueChange={(date) => {
                console.log(date);
            }}
            placeholder="Select date and time"
        />
    );
};

Built by Gihan (apix-js) for Shadcn at Vercel. Source code on GitHub.