@khorshid-js/react
v0.1.0
Published
Idiomatic React bindings for Khorshid — headless hooks + styled components for the Jalali & Gregorian date picker.
Maintainers
Readme
@khorshid-js/react
React bindings for Khorshid, a date picker with Jalali, Gregorian and Hijri calendars. The package has headless hooks and ready-made components.
npm install @khorshid-js/react @khorshid-js/core @khorshid-js/domimport { DatePicker, Calendar, useDatePicker } from '@khorshid-js/react';
import '@khorshid-js/react/styles.css';
<DatePicker locale="fa-IR" onChange={({ value }) => console.log(value.date?.iso)} />
<Calendar locale="en-US-gregorian" mode="range" months={2} />
// Headless: own the core and render whatever you like.
const { value, actions, state } = useDatePicker({ mode: 'range' });Supports React 18 and later. react, react-dom, @khorshid-js/core and @khorshid-js/dom are peer dependencies.
Most apps should install khorshid, which bundles every layer behind one import. Use the scoped packages when you want only some of them.
MIT
