├── .prettierrc.json ├── docs ├── CNAME └── index.html ├── .prettierignore ├── config ├── vitest │ ├── package.json │ ├── vitest.setup.ts │ └── vitest.config.ts ├── vitest.setup.ts ├── static │ └── index.html ├── start.ts ├── startApp.ts ├── build.ts ├── buildApp.ts ├── utils │ ├── filesUtils.ts │ ├── colorsUtils.ts │ ├── tsUtils.ts │ ├── filterConsoleUtils.ts │ └── esbuildUtils.ts └── vitest.config.ts ├── packages ├── example │ ├── src │ │ ├── code │ │ │ ├── index.ts │ │ │ └── code.ts │ │ ├── examples │ │ │ ├── index.tsx │ │ │ ├── examples.css │ │ │ └── examples.tsx │ │ ├── reactJewishDatePickerExample │ │ │ ├── index.ts │ │ │ ├── code.tsx │ │ │ ├── ReactJewishDatePickerExample.css │ │ │ └── ReactJewishDatePickerExample.tsx │ │ ├── app.tsx │ │ ├── index.tsx │ │ ├── app.css │ │ └── index.css │ ├── config │ │ ├── vitest.config.ts │ │ └── static │ │ │ └── index.html │ ├── index.html │ ├── .gitignore │ ├── tsconfig.json │ └── package.json ├── jewishDatesCore │ ├── config │ │ ├── package.json │ │ ├── vitest.config.ts │ │ ├── static │ │ │ └── index.html │ │ └── vitest.config.ts.timestamp-1741808516064-f9e8de71522fc.mjs │ ├── src │ │ ├── index.ts │ │ ├── interfaces.ts │ │ ├── jewishDateCore.ts │ │ └── __tests__ │ │ │ └── jewishDatesCore.test.tsx │ ├── app │ │ └── index.tsx │ ├── tsconfig.json │ ├── package.json │ └── README.md └── reactJewishDatePicker │ ├── src │ ├── utils │ │ ├── index.ts │ │ ├── testUtils.ts │ │ └── dateUtils.ts │ ├── index.ts │ ├── weekday.tsx │ ├── __tests__ │ │ ├── test-utils.jsx │ │ └── reactJewishDatePicker.test.tsx │ ├── interfaces.ts │ ├── reactJewishDatePicker.css │ ├── reactJewishDatePicker.tsx │ ├── navigation.tsx │ ├── day.tsx │ ├── month.css │ └── month.tsx │ ├── config │ ├── package.json │ ├── vitest.config.ts │ └── static │ │ └── index.html │ ├── app │ ├── index.css │ ├── index.tsx │ └── app.tsx │ ├── tsconfig.json │ ├── package.json │ └── README.md ├── .yarn ├── versions │ ├── 82d3b56d.yml │ ├── 373c9408.yml │ ├── 95027668.yml │ ├── d560bff0.yml │ └── d59fb678.yml └── sdks │ ├── integrations.yml │ ├── prettier │ ├── package.json │ ├── index.cjs │ └── bin │ │ └── prettier.cjs │ └── typescript │ ├── package.json │ ├── lib │ ├── typescript.js │ ├── tsc.js │ ├── tsserver.js │ └── tsserverlibrary.js │ └── bin │ ├── tsc │ └── tsserver ├── images ├── snapshot.png ├── snapshot_new.png ├── snapshot_hebrew.png └── snapshot_english.png ├── .editorconfig ├── dev.md ├── .yarnrc.yml ├── LICENSE ├── package.json ├── .gitignore ├── .github └── workflows │ └── ci.js.yml └── README.md /.prettierrc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /docs/CNAME: -------------------------------------------------------------------------------- 1 | react-jewish-datepicker.js.org -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | # Ignore artifacts: 2 | dist 3 | .yarn -------------------------------------------------------------------------------- /config/vitest/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module" 3 | } -------------------------------------------------------------------------------- /packages/example/src/code/index.ts: -------------------------------------------------------------------------------- 1 | export * from './code'; -------------------------------------------------------------------------------- /packages/example/src/examples/index.tsx: -------------------------------------------------------------------------------- 1 | export * from './examples'; -------------------------------------------------------------------------------- /packages/jewishDatesCore/config/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module" 3 | } -------------------------------------------------------------------------------- /packages/reactJewishDatePicker/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './testUtils'; -------------------------------------------------------------------------------- /packages/reactJewishDatePicker/config/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module" 3 | } -------------------------------------------------------------------------------- /.yarn/versions/82d3b56d.yml: -------------------------------------------------------------------------------- 1 | undecided: 2 | - example 3 | - jewish-dates-core 4 | -------------------------------------------------------------------------------- /packages/reactJewishDatePicker/app/index.css: -------------------------------------------------------------------------------- 1 | @import url('../src/reactJewishDatePicker.css'); -------------------------------------------------------------------------------- /.yarn/versions/373c9408.yml: -------------------------------------------------------------------------------- 1 | undecided: 2 | - jewish-dates-core 3 | - react-jewish-datepicker 4 | -------------------------------------------------------------------------------- /.yarn/versions/95027668.yml: -------------------------------------------------------------------------------- 1 | undecided: 2 | - jewish-dates-core 3 | - react-jewish-datepicker 4 | -------------------------------------------------------------------------------- /.yarn/versions/d560bff0.yml: -------------------------------------------------------------------------------- 1 | undecided: 2 | - jewish-dates-core 3 | - react-jewish-datepicker 4 | -------------------------------------------------------------------------------- /.yarn/versions/d59fb678.yml: -------------------------------------------------------------------------------- 1 | undecided: 2 | - jewish-dates-core 3 | - react-jewish-datepicker 4 | -------------------------------------------------------------------------------- /packages/example/src/reactJewishDatePickerExample/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ReactJewishDatePickerExample'; -------------------------------------------------------------------------------- /images/snapshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shmulik-Kravitz/react-jewish-datepicker/HEAD/images/snapshot.png -------------------------------------------------------------------------------- /images/snapshot_new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shmulik-Kravitz/react-jewish-datepicker/HEAD/images/snapshot_new.png -------------------------------------------------------------------------------- /images/snapshot_hebrew.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shmulik-Kravitz/react-jewish-datepicker/HEAD/images/snapshot_hebrew.png -------------------------------------------------------------------------------- /images/snapshot_english.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shmulik-Kravitz/react-jewish-datepicker/HEAD/images/snapshot_english.png -------------------------------------------------------------------------------- /packages/reactJewishDatePicker/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./reactJewishDatePicker"; 2 | export * from "./month"; 3 | export * from "./interfaces"; 4 | -------------------------------------------------------------------------------- /packages/example/config/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import {getConfig} from "../../../config/vitest.config"; 2 | const config = getConfig(); 3 | export default config; -------------------------------------------------------------------------------- /.yarn/sdks/integrations.yml: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by @yarnpkg/sdks. 2 | # Manual changes might be lost! 3 | 4 | integrations: 5 | - vscode 6 | -------------------------------------------------------------------------------- /packages/jewishDatesCore/config/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import {getConfig} from "../../../config/vitest/vitest.config"; 2 | const config = getConfig(); 3 | export default config; -------------------------------------------------------------------------------- /packages/reactJewishDatePicker/config/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import {getConfig} from "../../../config/vitest/vitest.config"; 2 | const config = getConfig(); 3 | export default config; -------------------------------------------------------------------------------- /.yarn/sdks/prettier/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "prettier", 3 | "version": "3.3.3-sdk", 4 | "main": "./index.cjs", 5 | "type": "commonjs", 6 | "bin": "./bin/prettier.cjs" 7 | } 8 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | 7 | [*.{js,json,yml}] 8 | charset = utf-8 9 | indent_style = space 10 | indent_size = 2 11 | -------------------------------------------------------------------------------- /packages/jewishDatesCore/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./interfaces"; 2 | export * from "./jewishDateCore"; 3 | import { JewishMonth as OrigJJewishMonth } from "jewish-date"; 4 | 5 | export const JewishMonth = OrigJJewishMonth; 6 | -------------------------------------------------------------------------------- /.yarn/sdks/typescript/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "typescript", 3 | "version": "5.6.2-sdk", 4 | "main": "./lib/typescript.js", 5 | "type": "commonjs", 6 | "bin": { 7 | "tsc": "./bin/tsc", 8 | "tsserver": "./bin/tsserver" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /dev.md: -------------------------------------------------------------------------------- 1 | ### Run local reposetery 2 | 3 | ```console 4 | npm install --global verdaccio 5 | verdaccio 6 | 7 | npmPublishRegistry: http://localhost:4873/ 8 | 9 | npmRegistryServer: http://localhost:4873/ 10 | 11 | unsafeHttpWhitelist: 12 | - localhost 13 | ``` -------------------------------------------------------------------------------- /config/vitest.setup.ts: -------------------------------------------------------------------------------- 1 | import "@testing-library/jest-dom"; 2 | import filterConsole from "./utils/filterConsoleUtils"; 3 | 4 | export const setup = () => { 5 | const disableFilter = filterConsole(['MODULE_NOT_FOUND']); 6 | }; 7 | export const teardown = () => { 8 | 9 | }; 10 | -------------------------------------------------------------------------------- /packages/example/src/app.tsx: -------------------------------------------------------------------------------- 1 | import { Examples } from './examples'; 2 | import "./app.css"; 3 | import React from "react"; 4 | 5 | function App() { 6 | 7 | return ( 8 |
75 | 121 |126 | ) : ( 127 |start day:
122 | {JSON.stringify(startDay, null, 2)} 123 |end day:
124 | {JSON.stringify(endDay, null, 2)} 125 |
{JSON.stringify(basicJewishDay, null, 2)}
128 | )}
129 | Install the package via Yarn:
156 |
157 | yarn add react-jewish-datepicker
158 |
170 |
171 | Or via npm:
172 |
173 | npm install react-jewish-datepicker --save
174 |
189 |
190 | Copy the import to your project:
192 |
193 | import "react-jewish-datepicker/dist/index.css";
194 |
209 |
210 | Returns whether a date is a Date object
24 |Returns an array of week days in hebrew
27 |Returns an array of week days in english
30 |Returns an array of week days
33 |Returns an array of jewish months in hebrew
36 |Returns an array of jewish months in english
39 |Returns an array of jewish months according to year and language
42 |Takes a number of a jewish year and returns array of 200 years around it
45 |Takes a BasicJewishMonthInfo object and returns the equivalent of prev month
48 |Takes a BasicJewishMonthInfo object and returns the equivalent of next month
51 |Converts BasicJewishDate object to gregorian date
54 |Takes a gregorian date and returns BasicJewishMonthInfo object
57 |Takes a BasicJewishDate object and returns a string of the date in english
60 |Takes a BasicJewishDate object and returns a string of the date in hebrew
63 |Takes a gregorian date and returns a BasicJewishDate object
66 |Compares jewish dates returning true if the dates match and false if not
69 |Takes a dayjs date and returns a JewishDay object
72 |Takes a gregorian date and returns a JewishMonth object
75 |Returns an array of jewish holiday dates corresponding with the isIsrael param
78 |Returns a function which can be passed to the `canSelect` prop, in order to prevent holidays selection
81 |A function to be passed to the "canSelect" prop, in order to prevent shabat selection
84 |Returns a function to be passed to the "canSelect" prop. combines "dontSelectHolidays" and "dontSelectShabat" in order to prevent both - shabat and holidays selection
87 |Takes 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
90 |Adds days to a given date
93 |Subtracts days to a given date
96 |