You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DatePicker already requires moment.js and moment.js already provides i18n. This is at the beginning of my project:
import moment from 'moment';
moment.locale('hu');
Some questions:
Let's suppose that the user has already setup a global locale with moment.js (which is required by DatePicker anyway). Shouldn't DatePicker use this global locale by default?
The documentation does not explain the localeUtils property. It just says that it is a "collection of functions that provide internationalization support.". I could look it up in the source code, but there is no implementation for it. Or at least, I could not find any. It would be very useful to create a default implementation that uses moment.js - since moment already provides the functions that are needed! It would be a very useful default implementation, e.g.:
const localeUtils = new MomentLocaleUtils("hu");
<DatePicker locale={localeUtils.locale} localeUtils={localeUtils} {...otherProps} />
The text was updated successfully, but these errors were encountered:
DatePicker and react-day-picker do not explicitly require moment.js, it is an optional dependency which you can use to implement the format/parse functions you supply as props to @blueprintjs/datetime components.
You can import localeUtils from react-day-picker. That's where we get the types for localeUtils. See:
The documentation on DatePicker does not tell what is localeUtils and how to use it.
https://blueprintjs.com/docs/versions/2/#datetime/datepicker
DatePicker already requires moment.js and moment.js already provides i18n. This is at the beginning of my project:
Some questions:
Let's suppose that the user has already setup a global locale with moment.js (which is required by DatePicker anyway). Shouldn't DatePicker use this global locale by default?
The documentation does not explain the localeUtils property. It just says that it is a "collection of functions that provide internationalization support.". I could look it up in the source code, but there is no implementation for it. Or at least, I could not find any. It would be very useful to create a default implementation that uses moment.js - since moment already provides the functions that are needed! It would be a very useful default implementation, e.g.:
The text was updated successfully, but these errors were encountered: