Skip to content

Commit

Permalink
build: update pnpm-lock.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
gpbl committed Sep 18, 2024
2 parents c5b4be3 + 4e11cf6 commit 913ac60
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 26 deletions.
2 changes: 1 addition & 1 deletion examples/Jalali.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import { faIR } from "date-fns/locale";
import { DayPicker } from "react-day-picker/jalali";

export function Jalali() {
return <DayPicker mode="single" locale={faIR} dir="rtl" />;
return <DayPicker mode="range" locale={faIR} dir="rtl" />;
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@
"tsconfig.json"
],
"dependencies": {
"date-fns": "^3.6.0"
"date-fns": "^4.1.0"
},
"devDependencies": {
"@date-fns/utc": "^1.2.0",
"@date-fns/utc": "^2.1.0",
"@jest/types": "^29.6.3",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.5.0",
Expand Down
37 changes: 15 additions & 22 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion src/jalali.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,14 @@ import {
} from "./index.js";

export function DayPicker(props: DayPickerProps) {
return <DayPickerComponent dateLib={jalaliDateLib} {...props} />;
return (
<DayPickerComponent
// @ts-expect-error The type definitions for the date-fns-jalali library
// are not compatible with the date-fns 4.0 types. The `addDays`
// function's return type is causing a type mismatch. (This casting should
// be not needed when date-fns-jalali upgrades to date-fns@4)
dateLib={jalaliDateLib}
{...props}
/>
);
}

0 comments on commit 913ac60

Please sign in to comment.