We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents aee993d + 233dcbe commit f153c05Copy full SHA for f153c05
src/Date/dateUtils.tsx
@@ -241,6 +241,13 @@ export function useInputFormat({
241
return useMemo(() => {
242
// TODO: something cleaner and more universal?
243
const inputDate = formatter.format(new Date(2020, 10 - 1, 1))
244
+
245
+ if (inputDate.includes('٢٠٢٠')) {
246
+ return inputDate
247
+ .replace('٢٠٢٠', 'YYYY')
248
+ .replace('١٠', 'MM')
249
+ .replace('٠١', 'DD')
250
+ }
251
return inputDate
252
.replace('2020', locale === 'pt' ? 'AAAA' : 'YYYY')
253
.replace('10', 'MM')
0 commit comments