{"id":13422059,"url":"https://github.com/mberneti/react-datepicker2","last_synced_at":"2025-03-15T10:31:39.856Z","repository":{"id":46964177,"uuid":"86168187","full_name":"mberneti/react-datepicker2","owner":"mberneti","description":"react datepicker component.(include persian jalaali calendar)","archived":true,"fork":false,"pushed_at":"2021-06-08T15:35:49.000Z","size":18428,"stargazers_count":232,"open_issues_count":36,"forks_count":79,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-09T18:31:04.758Z","etag":null,"topics":["calendar","datepicker","jalaali","jalaali-calendar","jalaali-datepicker","persian-datepicker","react","react-component","react-datepicker","react-datepicker2","react-persian-datepicker"],"latest_commit_sha":null,"homepage":"https://mberneti.github.io/react-datepicker2/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mberneti.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-25T15:39:54.000Z","updated_at":"2025-02-11T21:33:14.000Z","dependencies_parsed_at":"2022-08-24T01:51:04.749Z","dependency_job_id":null,"html_url":"https://github.com/mberneti/react-datepicker2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mberneti%2Freact-datepicker2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mberneti%2Freact-datepicker2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mberneti%2Freact-datepicker2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mberneti%2Freact-datepicker2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mberneti","download_url":"https://codeload.github.com/mberneti/react-datepicker2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243401496,"owners_count":20285055,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["calendar","datepicker","jalaali","jalaali-calendar","jalaali-datepicker","persian-datepicker","react","react-component","react-datepicker","react-datepicker2","react-persian-datepicker"],"created_at":"2024-07-30T23:00:36.401Z","updated_at":"2025-03-15T10:31:38.416Z","avatar_url":"https://github.com/mberneti.png","language":"JavaScript","readme":"# React DatePicker2\n\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n[![All Contributors](https://img.shields.io/badge/all_contributors-15-orange.svg?style=flat-square)](#contributors-)\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n\n[![npm](https://img.shields.io/npm/v/react-datepicker2.svg)](https://www.npmjs.com/package/react-datepicker2)\n[![npm](https://img.shields.io/npm/dt/react-datepicker2.svg)](https://www.npmjs.com/package/react-datepicker2)\n[![Build Status](https://travis-ci.org/mberneti/react-datepicker2.svg?branch=master)](https://travis-ci.org/mberneti/react-datepicker2)\n[![Dependency Status](https://david-dm.org/mberneti/react-datepicker2.svg)](https://david-dm.org/mberneti/react-datepicker2)\n\nA simple and reusable Datepicker component for React (with persian jalali calendar support) [Demo](https://mberneti.github.io/react-datepicker2/).\n\n![](https://mberneti.github.io/react-datepicker2/images/react-datepicker2.gif)\n\nThis package uses [react-persian-datepicker](https://github.com/evandhq/react-persian-datepicker) project under the hood.\n\n## Installation\n\nThe package can be installed via NPM:\n\n```\nnpm install react-datepicker2 --save\n```\n\nAt this point you can import react-datepicker2 and its styles in your application as follows:\n\n```js\nimport DatePicker from 'react-datepicker2';\n```\n\nBelow is a simple example on how to use the Datepicker in a React view.\n\n```js\nimport React from 'react'\nimport moment from 'moment-jalaali'\nimport DatePicker from 'react-datepicker2';\n\nexport default class ReactClass extends React.Component {\n  constructor(props) {\n    super(props);\n    this.state = { value: moment() };\n  }\n  render() {\n    return \u003cDatePicker\n      onChange={value =\u003e this.setState({ value })}\n      value={this.state.value}\n    /\u003e\n  }\n}\n```\n\n## Configuration\n\nThe most basic use of the DatePicker can be described with:\n\n```js\n\u003cDatePicker onChange={value =\u003e this.setState({ value })} value={this.state.value} /\u003e\n```\n\n## Local Development\n\nThe `master` branch contains the latest version of the Datepicker2 component. To start your example app, you can run `npm install` then `npm start`. This starts a simple webserver on http://localhost:8080.\n\n## Todo\n\n- [x] Write some tests\n- [x] Improve documentation\n- [x] Remove css loading dependency\n- [x] UI improvements\n- [x] Adding new highlight feature\n- [x] Adding new year picker feature\n- [x] Adding typescript support\n- [ ] Adding new rangepicker feature\n\n## Built With\n\n* [moment-jalaali](https://github.com/jalaali/moment-jalaali) - A Jalaali (Jalali, Persian, Khorshidi, Shamsi) calendar system plugin for moment.js.\n\n## Thanks\nSpecial thanks to [@mohebifar](https://github.com/mohebifar) for his open-source project which this component is based on.\n\n## Contributing\nContributions are **welcome** and will be fully **credited**.\nI'd be happy to accept PRs for that.\n\n## License\n\nCopyright (c) 2016 [mberneti](https://twitter.com/mberneti) Inc. and individual contributors. Licensed under MIT license, see [LICENSE](LICENSE) for the full license.\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://berneti.ir\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/3443365?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003emohammadreza berneti\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mberneti/react-datepicker2/commits?author=mberneti\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"#ideas-mberneti\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"https://github.com/mberneti/react-datepicker2/commits?author=mberneti\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"https://github.com/mberneti/react-datepicker2/issues?q=author%3Amberneti\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e \u003ca href=\"#design-mberneti\" title=\"Design\"\u003e🎨\u003c/a\u003e \u003ca href=\"#example-mberneti\" title=\"Examples\"\u003e💡\u003c/a\u003e \u003ca href=\"#maintenance-mberneti\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"#platform-mberneti\" title=\"Packaging/porting to new platform\"\u003e📦\u003c/a\u003e \u003ca href=\"#question-mberneti\" title=\"Answering Questions\"\u003e💬\u003c/a\u003e \u003ca href=\"https://github.com/mberneti/react-datepicker2/pulls?q=is%3Apr+reviewed-by%3Amberneti\" title=\"Reviewed Pull Requests\"\u003e👀\u003c/a\u003e \u003ca href=\"#projectManagement-mberneti\" title=\"Project Management\"\u003e📆\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/mohebifar\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/6104558?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMohamad Mohebifar\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#ideas-mohebifar\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"https://github.com/mberneti/react-datepicker2/commits?author=mohebifar\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"https://github.com/mberneti/react-datepicker2/commits?author=mohebifar\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/aliazizi\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/8492767?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAli Akbar Azizi\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#maintenance-aliazizi\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"#platform-aliazizi\" title=\"Packaging/porting to new platform\"\u003e📦\u003c/a\u003e \u003ca href=\"https://github.com/mberneti/react-datepicker2/commits?author=aliazizi\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/mberneti/react-datepicker2/issues?q=author%3Aaliazizi\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e \u003ca href=\"#question-aliazizi\" title=\"Answering Questions\"\u003e💬\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/alinjf\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/15678289?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAli Najafi\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#maintenance-alinjf\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"https://github.com/mberneti/react-datepicker2/commits?author=alinjf\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://mehralian.org\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/13819774?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMehrdad Mehralian\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mberneti/react-datepicker2/commits?author=dadwic\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"#design-dadwic\" title=\"Design\"\u003e🎨\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/shayegh\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/10929932?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003emojtaba Shayegh\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mberneti/react-datepicker2/issues?q=author%3Ashayegh\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e \u003ca href=\"https://github.com/mberneti/react-datepicker2/commits?author=shayegh\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/moryrasb\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/15072825?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003emory rezaee\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#maintenance-moryrasb\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"https://github.com/mberneti/react-datepicker2/commits?author=moryrasb\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/Doomfang3\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/37439688?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMathieu Saubin\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#maintenance-Doomfang3\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"https://github.com/mberneti/react-datepicker2/commits?author=Doomfang3\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/alireza-molaee\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/15848730?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003ealireza molaee\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#maintenance-alireza-molaee\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"https://github.com/mberneti/react-datepicker2/commits?author=alireza-molaee\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/alimzadeh\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/11006666?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAli MoghaddasZadeh\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mberneti/react-datepicker2/issues?q=author%3Aalimzadeh\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://ir.linkedin.com/in/amirzamani\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/6501462?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eamir zamani\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#maintenance-azadkuh\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"#platform-azadkuh\" title=\"Packaging/porting to new platform\"\u003e📦\u003c/a\u003e \u003ca href=\"https://github.com/mberneti/react-datepicker2/commits?author=azadkuh\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/mberneti/react-datepicker2/issues?q=author%3Aazadkuh\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e \u003ca href=\"#question-azadkuh\" title=\"Answering Questions\"\u003e💬\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://afsanefadaei.ir\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/37764909?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAfsane Fadaei\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#maintenance-afsanefda\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"#question-afsanefda\" title=\"Answering Questions\"\u003e💬\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://learnyab.com\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/17334987?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eHossein Aghatabar\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mberneti/react-datepicker2/issues?q=author%3Awhossein\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://salehian.me/\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/8876390?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMahdi \u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mberneti/react-datepicker2/commits?author=mahdisalehian\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/hoseinBL\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/3403583?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eHosein BehkamaL\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mberneti/react-datepicker2/commits?author=hoseinBL\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-enable --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","funding_links":[],"categories":["UI Components","React"],"sub_categories":["Form Components"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmberneti%2Freact-datepicker2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmberneti%2Freact-datepicker2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmberneti%2Freact-datepicker2/lists"}