File tree Expand file tree Collapse file tree 3 files changed +3
-9
lines changed Expand file tree Collapse file tree 3 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -36,9 +36,3 @@ import { Datepicker } from '@zendeskgarden/react-datepickers';
3636 < / Field>
3737< / ThemeProvider> ;
3838```
39-
40- ## date-fns dependency
41-
42- We currently use the v2, ` date-fns@next ` , distribution of [ date-fns] ( https://date-fns.org/ ) .
43- This allows us to provide a wider range of locales and include non-strict date parsing.
44- Ensure you are depending on locales from this version of ` date-fns ` .
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ export interface IDatepickerProps {
8181 */
8282 small ?: boolean ;
8383 /**
84- * Override default date parsing
84+ * Override default date parsing. Receives a localized input value and returns a `Date` object.
8585 */
8686 customParseDate ?: ( inputValue : string ) => Date ;
8787 /**
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ initialState = {
5757 >
5858 < DropdownField>
5959 < DropdownLabel> Locale< / DropdownLabel>
60- < DropdownHint> Using date - fns localization< / DropdownHint>
60+ < DropdownHint> Using Intl . DateTimeFormat localization< / DropdownHint>
6161 < Select> {state .locale .label }< / Select>
6262 < / DropdownField>
6363 < Menu>
@@ -72,7 +72,7 @@ initialState = {
7272 < Col lg= {8 }>
7373 < Field>
7474 < Label> Localized date< / Label>
75- < Hint> Using date - fns locale < / Hint>
75+ < Hint> Using Intl . DateTimeFormat localization < / Hint>
7676 < Datepicker
7777 value= {state .value }
7878 onChange= {newDate => {
You can’t perform that action at this time.
0 commit comments