Getting Started
Welcome to docs! react-modern-calendar-datepicker (a quite long name!) is a React date picker package supporting other languages locales(for now there are fa
and en
locales). It's lightweight, and it's easy to use. Before using this package, please pay attention to these two important points:
- 1- This package uses React hooks. Make sure you're running
react >= 16.8.0
version. - 2- By default, this package inherits
font-family
from your project. So whatever font you use for its wrapper, it will apply to datepicker as well. (If you are usingfa
locale language, it's recommended to use Iran Yekan (primary choice) or Iran Sans as your font family in order to have the best user experience)
Installation
Install it using Yarn:
yarn add react-modern-calendar-datepicker
Of if you prefer NPM:
npm i react-modern-calendar-datepicker
Basic Import
After the installation, it's time to import the package in your app:
import 'react-modern-calendar-datepicker/lib/DatePicker.css';
import DatePicker from 'react-modern-calendar-datepicker';
Great job! You're all set. It's time to write some code now. Learn more about the core concepts.