Works everywhere
Native React plus Web Components and vanilla createDateTimePicker. Vue, Svelte, Angular, plain HTML, and CDN from one package.
v2.1.3 · React · Vanilla · Vue · Svelte · Angular · and more
A date and time picker for any framework.
Date, time, datetime, and ranges in one package. Use it from React, Vue, Svelte, Angular, vanilla JS, or a CDN script.
npm install universal-datetime-picker Selected: null
Install once, then import the entry for your stack. Tabs below show the shortest path for each.
import { useState } from "react";
import { DateTimeInput } from "universal-datetime-picker";
import "universal-datetime-picker/style.css";
function App() {
const [value, setValue] = useState<Date | null>(null);
return (
<DateTimeInput
asString={false}
value={value}
onChange={(next) => setValue(next instanceof Date ? next : null)}
/>
);
} Native React plus Web Components and vanilla createDateTimePicker. Vue, Svelte, Angular, plain HTML, and CDN from one package.
Date-only overlays commit on day click. Datetime and time keep OK so you can set the clock first. DateTimeInput adds a calendar icon, customInput, and noStyle.
Dialog semantics, focus trap, Escape to dismiss, and arrow-key navigation. Opens on the first or last selectable day when bounds apply.
Omit asString for Date and TimeValue. CSS-variable themes, 12-hour clocks, locales, and TypeScript across ESM/CJS.
Tune options in the playground, or open a framework page for install notes and a focused demo.