File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -102,13 +102,20 @@ import { LocaleUtils } from "react-day-picker";
102102
103103By supplying a ` locale: string ` and ` localeUtils: LocaleUtils ` prop to these Blueprint components, you can
104104customize how dates are rendered, which day of the week is the first column, etc.
105+ You will need to overwrite the functions of ` LocaleUtil ` by your own.
105106[ See the interface definition for more details] ( https://github.com/gpbl/react-day-picker/blob/v7.3.0/types/utils.d.ts#L5 ) .
106107
107108Although ` @blueprintjs/datetime ` and ` react-day-picker ` do not explicitly require ` moment.js ` as a dependency,
108109you may wish to use Moment's implementation of localization so that you do not have to write these functions yourself.
109- The import from ` react-day-picker ` shown above gives you a utility object containing functions which do just that; you
110- may use it like so:
110+
111+ To use moment for your localization, make sure to include ` moment ` in your dependencies and use ` MomentLocaleUtils `
112+ from ` react-day-picker/moment ` as follow:
111113
112114``` tsx
113- <DatePicker locale = " fr" localeUtils = { LocaleUtils } />
115+ import MomentLocaleUtils from ' react-day-picker/moment'
116+ import ' moment/locale/fr' ;
117+
118+ <DatePicker locale = " fr" localeUtils = { MomentLocaleUtils } />
114119```
120+
121+ More detailed examples can be found in the [ ** react-day-picker** documentation] ( https://react-day-picker.js.org/docs/localization/ ) .
You can’t perform that action at this time.
0 commit comments