{"id":28394201,"url":"https://github.com/shmulik-kravitz/react-jewish-datepicker","last_synced_at":"2025-06-26T15:32:40.886Z","repository":{"id":40758085,"uuid":"269429998","full_name":"Shmulik-Kravitz/react-jewish-datepicker","owner":"Shmulik-Kravitz","description":"React jewish datepicker","archived":false,"fork":false,"pushed_at":"2025-04-30T18:32:04.000Z","size":12890,"stargazers_count":49,"open_issues_count":2,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-01T04:51:37.006Z","etag":null,"topics":["datepicker","hebrew","hebrew-calendar","hebrew-date","jewish","react","typescript"],"latest_commit_sha":null,"homepage":"https://react-jewish-datepicker.js.org/","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/Shmulik-Kravitz.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-04T18:03:47.000Z","updated_at":"2025-05-29T19:50:11.000Z","dependencies_parsed_at":"2024-01-18T22:32:13.699Z","dependency_job_id":"4d1a8539-9c72-4124-a4f7-4abe1a725adf","html_url":"https://github.com/Shmulik-Kravitz/react-jewish-datepicker","commit_stats":{"total_commits":101,"total_committers":4,"mean_commits":25.25,"dds":"0.14851485148514854","last_synced_commit":"ac6c7bc7085076ca6ce17811d7e78c38a446f7f0"},"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/Shmulik-Kravitz/react-jewish-datepicker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shmulik-Kravitz%2Freact-jewish-datepicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shmulik-Kravitz%2Freact-jewish-datepicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shmulik-Kravitz%2Freact-jewish-datepicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shmulik-Kravitz%2Freact-jewish-datepicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shmulik-Kravitz","download_url":"https://codeload.github.com/Shmulik-Kravitz/react-jewish-datepicker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shmulik-Kravitz%2Freact-jewish-datepicker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262094670,"owners_count":23258015,"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":["datepicker","hebrew","hebrew-calendar","hebrew-date","jewish","react","typescript"],"created_at":"2025-05-31T17:39:06.395Z","updated_at":"2025-06-26T15:32:40.876Z","avatar_url":"https://github.com/Shmulik-Kravitz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-jewish-datepicker\r\n\r\n[![npm](https://badge.fury.io/js/react-jewish-datepicker.svg)](https://www.npmjs.com/package/react-jewish-datepicker)\r\n[![CI](https://github.com/Shmulik-Kravitz/react-jewish-datepicker/workflows/CI_CD/badge.svg?branch=master)](https://github.com/Shmulik-Kravitz/react-jewish-datepicker/)\r\n![license](https://badgen.net/npm/license/react-jewish-datepicker)\r\n[![size minzip](https://img.shields.io/bundlephobia/minzip/react-jewish-datepicker.svg)](https://bundlephobia.com/package/react-jewish-datepicker)\r\n![downloads](https://badgen.net/npm/dt/react-jewish-datepicker)\r\n[![stars](https://badgen.net/github/stars/Shmulik-Kravitz/react-jewish-datepicker)](https://github.com/Shmulik-Kravitz/react-jewish-datepicker/)\r\n\r\n\r\n![npm](https://raw.githubusercontent.com/Shmulik-Kravitz/react-jewish-datepicker/master/images/snapshot.png)\r\n\r\n# React Jewish Date Picker\r\n\r\nGeneral Jewish Date Picker component that works with react and supports hebrew and english.\r\n\r\nSee also [demo and documentation](https://react-jewish-datepicker.js.org/) page.\r\n\r\n## Installation\r\n\r\n```console\r\nyarn add react-jewish-datepicker\r\n```\r\n\r\nOr with npm\r\n\r\n```console\r\nnpm install react-jewish-datepicker --save\r\n```\r\n\r\nImport the css\r\n\r\n```JavaScript\r\nimport \"react-jewish-datepicker/dist/index.css\";\r\n```\r\n\r\nor with css\r\n\r\n```JavaScript\r\n@import url(\"react-jewish-datepicker/dist/index.css\");\r\n```\r\n\r\n## Usage\r\n\r\n#### TypeScript example:\r\n\r\n```js\r\nimport * as React from \"react\";\r\nimport {\r\n  ReactJewishDatePicker,\r\n  BasicJewishDay,\r\n  BasicJewishDate\r\n} from \"react-jewish-datepicker\";\r\nimport \"react-jewish-datepicker/dist/index.css\";\r\nimport {\r\n  JewishMonth,\r\n} from \"jewish-dates-core\";\r\n\r\nexport default function App() {\r\n  const [basicJewishDay, setBasicJewishDay] = React.useState\u003cBasicJewishDay\u003e();\r\n  const basicJewishDate: BasicJewishDate = {\r\n    day: 13,\r\n    monthName: JewishMonth.Elul,\r\n    year: 5788\r\n  };\r\n\r\n  return (\r\n    \u003c\u003e\r\n      \u003cdiv\u003e\r\n        Hebrew:\r\n        \u003cReactJewishDatePicker\r\n          value={basicJewishDate}\r\n          isHebrew\r\n          onClick={(day: BasicJewishDay) =\u003e {\r\n            setBasicJewishDay(day);\r\n          }}\r\n        /\u003e\r\n      \u003c/div\u003e\r\n    \u003c/\u003e\r\n  );\r\n}\r\n\r\n\r\n```\r\n\r\n[![Edit react-jewish-datepicker-typescript-example](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/react-jewish-datepicker-typescript-example-1myb0?fontsize=14\u0026hidenavigation=1\u0026theme=dark)\r\n\r\n#### JavaScript example:\r\n\r\n```js\r\nimport * as React from \"react\";\r\nimport { ReactJewishDatePicker, BasicJewishDay } from \"react-jewish-datepicker\";\r\nimport \"react-jewish-datepicker/dist/index.css\";\r\n\r\nexport default function App() {\r\n  const [basicJewishDay, setBasicJewishDay] = React.useState();\r\n  return (\r\n    \u003cReactJewishDatePicker\r\n      value={new Date()}\r\n      isHebrew\r\n      onClick={(day) =\u003e {\r\n        setBasicJewishDay(day);\r\n      }}\r\n    /\u003e\r\n  );\r\n}\r\n```\r\n\r\n[![Edit react-jewish-datepicker-javascript-example](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/pedantic-gagarin-rdeov?fontsize=14\u0026hidenavigation=1\u0026theme=dark)\r\n\r\n## props\r\n\r\n| Prop name | Description                                                                  | Value types                                                                                                                          |\r\n| --------- | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |\r\n| canSelect | Accepts a function which determines whether a day is selectable              | `(day: BasicJewishDay) =\u003e condition ? false : true`                                                                                  |\r\n| isHebrew  | Optional. Whether the view language is hebrew or english, Default is `false` | `false` \\| `true`                                                                                                                    |\r\n| isRange   | Optional. Allow to select date ranges. Default is `false`                    | `false` \\| `true`                                                                                                                    |\r\n| onClick   | Callback when a date is selected                                             | `(day: BasicJewishDay) =\u003e console.log(day)` \\| `(startDay: BasicJewishDay, endDay: BasicJewishDay) =\u003e console.log(startDay, endDay)` |\r\n| value     | Optional. Initial selected date                                              | `Date` \\| `BasicJewishDate` \\| `BasicJewishDateRange` \\| `DateRange`                                                                 |\r\n\r\n### `canSelect` prop\r\n\r\nThe `canSelect` can take either a [`costum function`](https://react-jewish-datepicker.js.org/#disableWithCustomFunction) or one of the build-in functions as follows.\r\n\r\n#### dontSelectHolidays([isIsrael: `boolean`]) ⇒ `(day: BasicJewishDay) =\u003e boolean`\r\n\r\nTakes `isIsrael` param and returns a function which in turn is passed to the `canSelect` prop, in order to prevent holidays (corresponding with `isIsrael` param) selection.\r\n\r\n| Param | Type   | Default |\r\n| ----- | ------ | ----- |\r\n| isIsrael  | `boolean` | `false` |\r\n\r\nSee example [here](https://react-jewish-datepicker.js.org/#disableHolidays)\r\n\r\n#### dontSelectShabat(day: `BasicJewishDay`) ⇒ `boolean`\r\n\r\nA function to be passed to the `canSelect` prop, in order to prevent shabat selection.\r\n\r\nSee example [here](https://react-jewish-datepicker.js.org/#disableShabat)\r\n\r\n#### dontSelectShabatAndHolidays([isIsrael: `boolean`]) ⇒ `(day: BasicJewishDay) =\u003e boolean`\r\n\r\nTakes `isIsrael` param and returns a function to be passed to the \"canSelect\" prop. combines `dontSelectHolidays` and `dontSelectShabat` in order to prevent both - shabat and holidays selection.\r\n\r\n| Param | Type   | Default |\r\n| ----- | ------ | ----- |\r\n| isIsrael  | `boolean` | `false` |\r\n\r\nSee example [here](https://react-jewish-datepicker.js.org/#disableShabatAndHolidays)\r\n\r\n#### dontSelectOutOfRange(minDate: `Date` | `null`, maxDate: `Date` | `null`) ⇒ `(day: BasicJewishDay) =\u003e boolean`\r\n\r\nTakes min date and max date and returns a function to be passed to the \"canSelect\" prop, in order to prevent selection out of the supplied range.\r\n\r\nYou can pass a date only for one of the params and null to the other. In this case, the selectable range will be up to max date or from min date.\r\n\r\n| Param | Type   |\r\n| ----- | ------ |\r\n| minDate  | `Date` \\| `null` |\r\n| maxDate  | `Date` \\| `null` |\r\n\r\nSee example [here](https://react-jewish-datepicker.js.org/#selectionWithinRange)\r\n\r\n### Helper Functions\r\n\r\n#### addDates(date: `BasicJewishDate` | `Date`, numDays: `number`) ⇒ `Date`\r\n\r\na helper function for `dontSelectOutOfRange`.\r\n\r\nTakes a `BasicJewishDate` object or a `Date`, adds a date interval (`numDays`) to the date and then returns the new date. \r\n\r\n| Param | Type   |\r\n| ----- | ------ |\r\n| date  | `BasicJewishDate` \\| `Date` |\r\n| numDays  | `number` |\r\n\r\nSee example [here](https://react-jewish-datepicker.js.org/#selectionWithinRange)\r\n\r\n#### subtractDates(date: `BasicJewishDate` | `Date`, numDays: `number`) ⇒ `Date`\r\n\r\na helper function for `dontSelectOutOfRange`.\r\n\r\nTakes a `BasicJewishDate` object or a `Date`, subtracts a date interval (`numDays`) from the date and then returns the new date.\r\n\r\n| Param | Type   |\r\n| ----- | ------ |\r\n| date  | `BasicJewishDate` \\| `Date` |\r\n| numDays  | `number` |\r\n\r\nSee example [here](https://react-jewish-datepicker.js.org/#selectionWithinRange)\r\n\r\n### jewish-dates-core\r\n\r\nTo create a jewish date picker in vue.js or angular, see our [core dependency](https://github.com/Shmulik-Kravitz/react-jewish-datepicker/blob/master/packages/jewishDatesCore/README.md).\r\n\r\n### jewish-date\r\n\r\nIf you only need the hebrew date convertor without a date picker you can use [jewish-date](https://www.npmjs.com/package/jewish-date).\r\n\r\n\r\n## Contributors\r\n\r\n- [Shmulik Kravitz](https://github.com/Shmulik-Kravitz)\r\n- [Sagi Tawil](https://github.com/sagi770)\r\n- [Yochanan Sheinberger](https://github.com/yochanan-sheinberger)\r\n\r\nLicense: [MIT](https://github.com/Shmulik-Kravitz/react-jewish-datepicker/blob/master/LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshmulik-kravitz%2Freact-jewish-datepicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshmulik-kravitz%2Freact-jewish-datepicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshmulik-kravitz%2Freact-jewish-datepicker/lists"}