@jalali-js/ui-react
v0.4.2
Published
RangePicker, EventCalendar, InlineCalendar, and extra themes for @jalali-js/react, built on the same headless primitives.
Maintainers
Readme
@jalali-js/ui-react
Higher-level React UI on @jalali-js/react: RangePicker, InlineCalendar, EventCalendar,
and TimeRangePicker, plus extra themes.
Start here: Live demo · Documentation
npm ecosystem: jalali-js · @jalali-js/i18n · @jalali-js/nlp · @jalali-js/holidays · @jalali-js/react · @jalali-js/vue · @jalali-js/web · @jalali-js/ui-react · @jalali-js/ui-vue · @jalali-js/ui-web
Contents
Install
npm install @jalali-js/ui-react @jalali-js/reactimport '@jalali-js/react/date-picker.css';Compatibility
| Item | Support |
| ----- | ------------------------------ |
| React | 18 and 19 (CI matrix) |
| Peers | react and react-dom >=18 |
| Node | 22 and 24 (CI matrix) |
Quick start
import '@jalali-js/react/date-picker.css';
import { RangePicker, InlineCalendar } from '@jalali-js/ui-react';
<RangePicker system="jalali" locale="fa" onChange={(value, range) => {}} />;
<InlineCalendar system="jalali" locale="fa" onSelect={setDay} />;Components
| Component | Role |
| ----------------- | ---------------------------------------------------- |
| RangePicker | Start and end dates, one storage value per end |
| InlineCalendar | Always-visible month grid |
| EventCalendar | Month / week / day / timeline views over your events |
| TimeRangePicker | Start and end times |
You own the event list and editing UI for EventCalendar. Expand recurring rules before
pass-in. Layout helpers live in jalali-js.
Options
Key RangePicker props:
| Prop | Type | Default | Notes |
| -------------- | ---------------- | ----------------- | ---------------------- |
| system | CalendarSystem | 'jalali' | Display calendar |
| locale | LocaleCode | 'en' | UI language |
| valueFormat | ValueFormat | 'gregorian-iso' | Storage shape for ends |
| rules | SelectionRules | - | Day and range limits |
| showHolidays | boolean | false | Mark holidays |
EventCalendar: view (month / week / day / timeline), events,
timeline.layout (single / alternating / roadmap), onEventClick.
Full tables: React guide and Event calendar.
Theming
Same --jalali-* tokens as @jalali-js/react. Extra theme stylesheets ship under this
package when you need a preset look.
[data-jalali-datepicker-root] {
--jalali-primary: #0f766e;
--jalali-radius: 12px;
}See Theming.
Links
License
MIT
