diff --git a/playground/app.tsx b/playground/app.tsx index de24280..bd11158 100644 --- a/playground/app.tsx +++ b/playground/app.tsx @@ -18,6 +18,7 @@ export default () => { day: 1 }} onSelect={onSelect} + localization="zh-CN" /> ) diff --git a/src/components/SingleDatePicker.tsx b/src/components/SingleDatePicker.tsx index 2c30f0a..cb97e0a 100644 --- a/src/components/SingleDatePicker.tsx +++ b/src/components/SingleDatePicker.tsx @@ -83,37 +83,45 @@ export default ({ value, onSelect, localization }: Props) => { + }} aria-label={`Go to last year, ${currentYear - 1}, you are now at year ${currentYear}`}> setCurrentYear(parseInt(e.target.value))} + aria-label="Year input, type a year to go to that year" /> + }} aria-label={`Go to next year, ${currentYear + 1}, you are now at year ${currentYear}`}>
{Array.from({ length: 12 }).map((_, index) => )}
) else return (
- - + - +
{l10nDays.map((day, index) =>
{day}
)} - {dates.map(date => )}