Skip to content

Commit 20a96ec

Browse files
Merge pull request #507 from web-ridge/copilot/update-date-picker-component
[WIP] Update date picker component for improved accessibility
2 parents c81f241 + e743eb0 commit 20a96ec

4 files changed

Lines changed: 27 additions & 1 deletion

File tree

docusaurus/docs/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ npm install react-native-paper-dates --save
3636

3737
### Supported
3838

39-
React-Native-Paper-Dates currently supports `ar/ca/de/en/en-GB/es/fi/fr/he/hi/it/ko/nl/pl/pt/tr/zh/zh-TW/cs/el/ru/ro/id/ja/th/uk-UA/no-NO/sv` translations. Ideally you would do this somewhere before react-native-paper-dates is used. For example, you might add the follow to your `index.js` or `app.js`.
39+
React-Native-Paper-Dates currently supports `ar/ca/da/de/en/en-GB/es/fi/fr/he/hi/it/ko/nl/pl/pt/tr/zh/zh-TW/cs/el/ru/ro/id/ja/th/uk-UA/no-NO/sv` translations. Ideally you would do this somewhere before react-native-paper-dates is used. For example, you might add the follow to your `index.js` or `app.js`.
4040

4141
```javascript
4242
import { enGB, registerTranslation } from 'react-native-paper-dates'

example/src/App.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import {
3333
TranslationsType,
3434
ar,
3535
ca,
36+
da,
3637
de,
3738
en,
3839
enGB,
@@ -68,6 +69,7 @@ const presentationStyles = ['overFullScreen', 'pageSheet'] as const
6869
const locales: [string, TranslationsType][] = [
6970
['ar', ar],
7071
['ca', ca],
72+
['da', da],
7173
['de', de],
7274
['en', en],
7375
['en-GB', enGB],

src/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export { registerTranslation, getTranslation } from './translations/utils'
1414

1515
export { default as ar } from './translations/ar'
1616
export { default as ca } from './translations/ca'
17+
export { default as da } from './translations/da'
1718
export { default as de } from './translations/de'
1819
export { default as en } from './translations/en'
1920
export { default as enGB } from './translations/enGB'

src/translations/da.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import type { TranslationsType } from './utils'
2+
3+
const da: TranslationsType = {
4+
save: 'Gem',
5+
selectSingle: 'Vælg dato',
6+
selectMultiple: 'Vælg datoer',
7+
selectRange: 'Vælg periode',
8+
notAccordingToDateFormat: (inputFormat) =>
9+
`Dato formatet skal være ${inputFormat}`,
10+
mustBeHigherThan: (date) => `Skal ligge efter ${date}`,
11+
mustBeLowerThan: (date) => `Skal ligge før ${date}`,
12+
mustBeBetween: (startDate, endDate) =>
13+
`Skal være mellem ${startDate} - ${endDate}`,
14+
dateIsDisabled: 'Denne dag er ikke gyldig',
15+
previous: 'Forrige',
16+
next: 'Næste',
17+
typeInDate: 'Indtast dato',
18+
pickDateFromCalendar: 'Vælg en dato fra kalender',
19+
close: 'Luk',
20+
minute: 'Minut',
21+
hour: 'Time',
22+
}
23+
export default da

0 commit comments

Comments
 (0)