dmtrKovalenko / date-io

Abstraction over common javascript date management libraries
MIT License
726 stars 90 forks source link

Support luxon 3.0.* #631

Closed davidnx closed 2 years ago

davidnx commented 2 years ago

Onboarding experience with @mui/x-date-pickers is bad at the moment due to incompatibility with luxon 3.0.*.

Took me a while to figure it out, and I can imagine countless other people would face the same trouble. The issue manifests as luxon DateTime values being considered invalid by this library, which then causes @mui/x-date-pickers to render the component in error state (red border). Validation error comes from here:

https://github.com/dmtrKovalenko/date-io/blob/44bfe7d7eb03bf0b915bd432e9ea3be095a09c93/packages/luxon/src/luxon-utils.ts#L137

The DateTime object produced by luxon@3.0.4 doesn't pass this check, obviously....

Please consider (a) upgrading to support luxon 3.0.*; or (b) produce a meaningful dev-friendly warning to indicate the version incompatibility when consuming code is using an unsupported version of luxon.

davidnx commented 2 years ago

No longer an issue since v2.16.1