From 0bb67fde27523af7e76d00bf8a51adee360a0e23 Mon Sep 17 00:00:00 2001 From: Dave Meyer <7davidmeyer@gmail.com> Date: Mon, 24 Jun 2024 19:18:28 +0200 Subject: [PATCH 1/9] Update navigation.mdx Used strongly-typed useState(...) hook --- website/docs/using-daypicker/navigation.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/using-daypicker/navigation.mdx b/website/docs/using-daypicker/navigation.mdx index 1ffe883634..926ee931c0 100644 --- a/website/docs/using-daypicker/navigation.mdx +++ b/website/docs/using-daypicker/navigation.mdx @@ -45,7 +45,7 @@ export function Controlled() { const today = new Date(); const nextMonth = addMonths(today, 1); - const [month, setMonth] = useState(nextMonth); + const [month, setMonth] = useState(nextMonth); return ( <> From 9afa5c87c46973d423703f7be13c9485eb589694 Mon Sep 17 00:00:00 2001 From: Dave Meyer <7davidmeyer@gmail.com> Date: Mon, 24 Jun 2024 19:21:17 +0200 Subject: [PATCH 2/9] Update selection-modes.mdx Used strongly-typed useState(...) hook --- website/docs/using-daypicker/selection-modes.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/using-daypicker/selection-modes.mdx b/website/docs/using-daypicker/selection-modes.mdx index b9b8573d49..3543383730 100644 --- a/website/docs/using-daypicker/selection-modes.mdx +++ b/website/docs/using-daypicker/selection-modes.mdx @@ -48,7 +48,7 @@ import { DayPicker } from "react-day-picker"; export function App() { const initiallySelectedDate = new Date(); - const [selectedDate, setSelectedDate] = useState(initiallySelectedDate); + const [selectedDate, setSelectedDate] = useState(initiallySelectedDate); return ( (); const handleSelect = (newSelected) => { // Update the selected dates setSelected(newSelected); From a93270ee501804756d7d75093517d9ade66dad81 Mon Sep 17 00:00:00 2001 From: Dave Meyer <7davidmeyer@gmail.com> Date: Mon, 24 Jun 2024 19:25:32 +0200 Subject: [PATCH 3/9] Update start.mdx Used strongly-typed useState(...) hook --- website/docs/start.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/start.mdx b/website/docs/start.mdx index 204f1f15ae..222c2fd564 100644 --- a/website/docs/start.mdx +++ b/website/docs/start.mdx @@ -30,7 +30,7 @@ import { DayPicker } from "react-day-picker"; import "react-day-picker/style.css"; export function MyDatePicker() { - const [selected, setSelected] = useState(); + const [selected, setSelected] = useState(); return ; } ``` From 2e5c3558e4a3d5b481e37f271659b4880d78eb43 Mon Sep 17 00:00:00 2001 From: Dave Meyer <7davidmeyer@gmail.com> Date: Wed, 26 Jun 2024 20:33:12 +0200 Subject: [PATCH 4/9] Update README.md Used strongly-typed useState(...) hook --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 33162007f6..780f4f200c 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ import { DayPicker } from "react-day-picker"; import "react-day-picker/dist/style.css"; function MyDatePicker() { - const [selected, setSelected] = useState(); + const [selected, setSelected] = useState(); return ; } ``` From 8f20729de2872bf0a334627613420094529a30e3 Mon Sep 17 00:00:00 2001 From: Dave Meyer <7davidmeyer@gmail.com> Date: Sun, 7 Jul 2024 21:23:00 +0200 Subject: [PATCH 5/9] Update README.md Date can also be undefined Co-authored-by: Giampaolo Bellavite --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 780f4f200c..136fab5c01 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ import { DayPicker } from "react-day-picker"; import "react-day-picker/dist/style.css"; function MyDatePicker() { - const [selected, setSelected] = useState(); + const [selected, setSelected] = useState(); return ; } ``` From 23b75344bd180621e930efba55626ed951b4bc95 Mon Sep 17 00:00:00 2001 From: Dave Meyer <7davidmeyer@gmail.com> Date: Sun, 7 Jul 2024 21:23:34 +0200 Subject: [PATCH 6/9] Update website/docs/start.mdx Date can also be undefined Co-authored-by: Giampaolo Bellavite --- website/docs/start.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/start.mdx b/website/docs/start.mdx index 222c2fd564..1dd9874735 100644 --- a/website/docs/start.mdx +++ b/website/docs/start.mdx @@ -30,7 +30,7 @@ import { DayPicker } from "react-day-picker"; import "react-day-picker/style.css"; export function MyDatePicker() { - const [selected, setSelected] = useState(); + const [selected, setSelected] = useState(); return ; } ``` From 57934cb3ca8dea1c265808a2dc900cf8d4f72e82 Mon Sep 17 00:00:00 2001 From: Dave Meyer <7davidmeyer@gmail.com> Date: Sun, 7 Jul 2024 21:24:09 +0200 Subject: [PATCH 7/9] Update website/docs/using-daypicker/navigation.mdx Removed unneeded typing Co-authored-by: Giampaolo Bellavite --- website/docs/using-daypicker/navigation.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/using-daypicker/navigation.mdx b/website/docs/using-daypicker/navigation.mdx index 926ee931c0..1ffe883634 100644 --- a/website/docs/using-daypicker/navigation.mdx +++ b/website/docs/using-daypicker/navigation.mdx @@ -45,7 +45,7 @@ export function Controlled() { const today = new Date(); const nextMonth = addMonths(today, 1); - const [month, setMonth] = useState(nextMonth); + const [month, setMonth] = useState(nextMonth); return ( <> From 8f8656617a4d618c4fd964f1ff312cb50684dfb6 Mon Sep 17 00:00:00 2001 From: Dave Meyer <7davidmeyer@gmail.com> Date: Sun, 7 Jul 2024 21:24:29 +0200 Subject: [PATCH 8/9] Update website/docs/using-daypicker/selection-modes.mdx Added Date array type Co-authored-by: Giampaolo Bellavite --- website/docs/using-daypicker/selection-modes.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/using-daypicker/selection-modes.mdx b/website/docs/using-daypicker/selection-modes.mdx index 2025fb4dc2..7737d724a7 100644 --- a/website/docs/using-daypicker/selection-modes.mdx +++ b/website/docs/using-daypicker/selection-modes.mdx @@ -217,7 +217,7 @@ import { useState } from "react"; import { DayPicker } from "react-day-picker"; export function App() { - const [selected, setSelected] = useState(); + const [selected, setSelected] = useState(); const handleSelect = (newSelected) => { // Update the selected dates setSelected(newSelected); From 88c80ac2aa96db629df7a12ebe61ac4e86881189 Mon Sep 17 00:00:00 2001 From: Dave Meyer <7davidmeyer@gmail.com> Date: Sun, 7 Jul 2024 21:24:46 +0200 Subject: [PATCH 9/9] Update website/docs/using-daypicker/selection-modes.mdx Removed unneeded/obvious typing Co-authored-by: Giampaolo Bellavite --- website/docs/using-daypicker/selection-modes.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/using-daypicker/selection-modes.mdx b/website/docs/using-daypicker/selection-modes.mdx index 7737d724a7..e4dd87006e 100644 --- a/website/docs/using-daypicker/selection-modes.mdx +++ b/website/docs/using-daypicker/selection-modes.mdx @@ -49,7 +49,7 @@ import { DayPicker } from "react-day-picker"; export function App() { const initiallySelectedDate = new Date(); - const [selectedDate, setSelectedDate] = useState(initiallySelectedDate); + const [selectedDate, setSelectedDate] = useState(initiallySelectedDate); return (