diff --git a/website/docs/docs/navigation.mdx b/website/docs/docs/navigation.mdx index 35fb62e6c..adccb67bb 100644 --- a/website/docs/docs/navigation.mdx +++ b/website/docs/docs/navigation.mdx @@ -31,7 +31,18 @@ To programmatically control the month displayed when navigating, use the `month` | `month` | `Date` | The month displayed in the calendar. | | `onMonthChange` | [`MonthChangeEventHandler`](../api/type-aliases/MonthChangeEventHandler.md) | Callback when the month changes. | -### "Today" Button +```tsx +import { useState } from "react"; + +import { DayPicker } from "react-day-picker"; + +export function Controlled() { + const [month, setMonth] = useState(new Date()); + return ; +} +``` + +### Today Button For example, to implement a Go to Today button, set `month` to the current date when the button is clicked.