Skip to content

samimideveloper/react-jalaali-date-picker

 
 

Repository files navigation

React Jalaali Datepicker

An advanced jalaali date or range picker that supports on all of Javascript frameworks, Specially React and React Native

Version MIT License

Documentation

Installation

Install jalaali-react-date-picker with npm

  npm install jalaali-react-date-picker

Install jalaali-react-date-picker with yarn

  yarn add jalaali-react-date-picker

Running Tests

To run tests, run the following command

  npm run test or yarn test

Usage/Examples

import DatePicker from "jalaali-react-date-picker";

function App() {
  return <DatePicker />;
}

Features

  • Full support on React and React Native libraries
  • Full styles customization (style overrides, colors and etc)
  • Support jalaali (Shamsi) date mode format

props

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

Authors

Using Third Party

momentjs

License

MIT

About

A react jalaali (persian) date picker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 89.1%
  • CSS 9.5%
  • JavaScript 1.3%
  • Other 0.1%