diff --git a/README.md b/README.md index 005ba7bb..192f5923 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ Displays a complete, interactive calendar. |minDate|Minimum date that the user can select. Periods partially overlapped by minDate will also be selectable, although React-Calendar will ensure that no earlier date is selected.|n/a|Date: `new Date()`| |minDetail|The least detailed view that the user shall see. Can be `"month"`, `"year"`, `"decade"` or `"century"`.|`"century"`|`"decade"`| |navigationAriaLabel|`aria-label` attribute of a label rendered on calendar navigation bar.|n/a|`"Go up"`| -|navigationLabel|Content of a label rendered on calendar navigation bar.|(default label)|``({ locale, date, view, label }) => `Current view: ${view}, date: ${date.toLocaleDateString(locale)}` ``| +|navigationLabel|Content of a label rendered on calendar navigation bar.|(default label)|``({ date, label, locale, view }) => `Current view: ${view}, date: ${date.toLocaleDateString(locale)}` ``| |nextAriaLabel|`aria-label` attribute of the "next" button on the navigation pane.|n/a|`"Next"`| |nextLabel|Content of the "next" button on the navigation pane.|`"›"`|| |next2AriaLabel|`aria-label` attribute of the "next on higher level" button on the navigation pane.|n/a|`"Jump forwards"`| diff --git a/src/Calendar/Navigation.jsx b/src/Calendar/Navigation.jsx index 5da2cc9d..e1001429 100644 --- a/src/Calendar/Navigation.jsx +++ b/src/Calendar/Navigation.jsx @@ -113,10 +113,10 @@ export default function Navigation({ return ( navigationLabel ? navigationLabel({ - locale: locale || getUserLocale(), date, - view, label, + locale: locale || getUserLocale(), + view, }) : label );