Skip to content

Commit

Permalink
Merge pull request #6745 from Sage/update-date-input-docs
Browse files Browse the repository at this point in the history
chore(date, date-range): update docs for locale imports
  • Loading branch information
edleeks87 committed May 23, 2024
2 parents 8123b49 + 92cb0a4 commit 5a0fe61
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/date-range/date-range.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ You can use the `isOptional` prop to indicate if the fields are optional.
### Locale override

The examples below illustrates how to override the locale passed into the DateRange component. In this example it has been set up for
the French locale. Required locales can be imported like so `import { fr } from 'carbon-react/lib/locales/date-fns-locales';`
the French locale. Required locales can be imported like so `import { fr } from 'date-fns/locale';`

<Canvas of={DateRangeStories.LocaleOverrideExampleImplementation} />

Expand Down
2 changes: 1 addition & 1 deletion src/components/date/date.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ The example below will display an error if an invalid date or a date with a year
### Locale override

The examples below illustrate how to override the locale passed into the Date component. The first example has been set up for
the German (`de`) locale whilst the second is for a Chinese (`zh-CN`) locale. Required locales can be imported like so `import { de, zhCN } from 'carbon-react/lib/locales/date-fns-locales';`
the German (`de`) locale whilst the second is for a Chinese (`zh-CN`) locale. Required locales can be imported like so `import { de, zhCN } from 'date-fns/locale';`

<Canvas of={DateStories.LocaleOverrideExampleImplementation} />

Expand Down

0 comments on commit 5a0fe61

Please sign in to comment.