fix: update documentation in SingleDatePicker to clarify screen reader behavior with localization

This commit is contained in:
Astrian Zheng 2025-02-19 21:43:35 +11:00
parent 7a76aecb30
commit b17a95c47b
Signed by: Astrian
SSH Key Fingerprint: SHA256:rVnhx3DAKjujCwWE13aDl7uV6+9U1MvydLkNRXJrBiA

View File

@ -26,7 +26,8 @@ interface Props {
* function that will be called when a date is selected inside the panel.
* @param {string} props.localization - The language code that will be used to localize the panel.
* Accept standard ISO 639-1 language code, such as 'zh-CN', 'en-US', 'ja-JP', etc. Default to the
* language of the users browser. Note that it will not effect to the screen reader.
* language of the users browser. Note that it will not effect to the screen reader, but the screen
* reader will still read the date in the users language.
*/
export default ({ value, onSelect, localization }: Props) => {
const [currentMonth, setCurrentMonth] = useState(new Date().getMonth())