An advanced jalaali date or range picker that supports on all of Javascript frameworks, Specially React and React Native
Install jalaali-react-date-picker with npm
npm install jalaali-react-date-pickerInstall jalaali-react-date-picker with yarn
yarn add jalaali-react-date-pickerTo run tests, run the following command
npm run test or yarn testimport DatePicker from "jalaali-react-date-picker";
function App() {
return <DatePicker />;
}- Full support on React and React Native libraries
- Full styles customization (style overrides, colors and etc)
- Support jalaali (Shamsi) date mode format
| Property | Type | Description |
|---|---|---|
value |
Moment |
To set date |
defaultValue |
Moment |
To set default date, if date is null or undefined, the date will be set |
onChange |
(date: Value, dateString: string) => void |
Callback function, can be executed when the selected date is changing |
onDayChange |
(day: number) => void |
Callback function, can be executed then return day when the selected date is changing |
onMonthChange |
(month: MonthValue) => void |
Callback function, can be executed then return month when the selected date is changing |
onYearChange |
(year: number) => void |
Callback function, can be executed then return year when the selected date is changing |
disabledDates |
(current: Moment) => boolean | DisabledValueRange |
To specify the date that cannot be selected |
dayRender |
(date: Moment,dayNode:React.ReactNode) => React.ReactNode |
Render custom day component in panel |
renderExtraHeader |
(current:Moment) => React.ReactNode |
Render extra header in panel |
renderFooter |
(current:Moment) => React.ReactNode |
Render extra footer in panel |
locale |
Locale |
Locale configuration |