From 12451fcfe779d7cc55c4364a058c12e28511757f Mon Sep 17 00:00:00 2001 From: TJ Egan Date: Thu, 28 Jan 2021 09:25:22 -0800 Subject: [PATCH] fix(DatePicker): add more locales to valid locales (#7666) * fix(DatePicker): add more locales to valid locales * chore(snapshot): update snapshots --- .../__tests__/__snapshots__/PublicAPI-test.js.snap | 11 +++++++++++ .../react/src/components/DatePicker/DatePicker.js | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap index 0fdfd725735f..82e3df3d8df7 100644 --- a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap +++ b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap @@ -2082,9 +2082,11 @@ Map { Array [ "ar", "at", + "az", "be", "bg", "bn", + "bs", "cat", "cs", "cy", @@ -2096,16 +2098,22 @@ Map { "et", "fa", "fi", + "fo", "fr", + "ga", "gr", "he", "hi", "hr", "hu", "id", + "is", "it", "ja", + "ka", + "km", "ko", + "kz", "lt", "lv", "mk", @@ -2123,12 +2131,15 @@ Map { "sk", "sl", "sq", + "sr-cyr", "sr", "sv", "th", "tr", "uk", + "uz", "vn", + "zh-tw", "zh", ], ], diff --git a/packages/react/src/components/DatePicker/DatePicker.js b/packages/react/src/components/DatePicker/DatePicker.js index a2721ae000dc..99c3383f874d 100644 --- a/packages/react/src/components/DatePicker/DatePicker.js +++ b/packages/react/src/components/DatePicker/DatePicker.js @@ -162,9 +162,11 @@ export default class DatePicker extends Component { locale: PropTypes.oneOf([ 'ar', // Arabic 'at', // Austria + 'az', // Azerbaijan 'be', // Belarusian 'bg', // Bulgarian 'bn', // Bangla + 'bs', // Bosnia 'cat', // Catalan 'cs', // Czech 'cy', // Welsh @@ -176,16 +178,22 @@ export default class DatePicker extends Component { 'et', // Estonian 'fa', // Persian 'fi', // Finnish + 'fo', // Faroese 'fr', // French + 'ga', // Gaelic 'gr', // Greek 'he', // Hebrew 'hi', // Hindi 'hr', // Croatian 'hu', // Hungarian 'id', // Indonesian + 'is', // Icelandic 'it', // Italian 'ja', // Japanese + 'ka', // Georgian + 'km', // Khmer 'ko', // Korean + 'kz', // Kazakh 'lt', // Lithuanian 'lv', // Latvian 'mk', // Macedonian @@ -203,12 +211,15 @@ export default class DatePicker extends Component { 'sk', // Slovak 'sl', // Slovenian 'sq', // Albanian + 'sr-cyr', // Serbian Cyrillic 'sr', // Serbian 'sv', // Swedish 'th', // Thai 'tr', // Turkish 'uk', // Ukrainian + 'uz', // Uzbek 'vn', // Vietnamese + 'zh-tw', // Mandarin Traditional 'zh', // Mandarin ]),