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
While this is not technically a bug, I do believe that this is a very important feature for compatibility with moment based libraries.
Current behavior
Applying a plugin (using .extend()) alters the global dayjs constructor. For dayjs to be a replacement for moment in e.g. third party libraries, it is sometimes necessary to use the badMutable plugin.
But when this plugin is applied, whether manually or by some third party code, all dayjs instances in the code base suddenly become mutable, which can lead to unexpected behavior and nasty bugs.
Expected behavior
It should be possible to apply the badMutable plugin locally, to prevent all dayjs instances to suddenly become mutable.
By looking at the source code, I couldn't find a way to make this possible.
Any help or suggestions, would be highly appreciated!!
Thanks :D
There has been a discussion on this before: #655
And this exact issue has let react-day-picker (~4.6K ⭐) to stop using dayjs.
The text was updated successfully, but these errors were encountered:
While this is not technically a bug, I do believe that this is a very important feature for compatibility with
moment
based libraries.Current behavior
Applying a plugin (using
.extend()
) alters the globaldayjs
constructor. Fordayjs
to be a replacement formoment
in e.g. third party libraries, it is sometimes necessary to use thebadMutable
plugin.But when this plugin is applied, whether manually or by some third party code, all
dayjs
instances in the code base suddenly become mutable, which can lead to unexpected behavior and nasty bugs.Expected behavior
It should be possible to apply the
badMutable
plugin locally, to prevent alldayjs
instances to suddenly become mutable.By looking at the source code, I couldn't find a way to make this possible.
Any help or suggestions, would be highly appreciated!!
Thanks :D
There has been a discussion on this before: #655
And this exact issue has let
react-day-picker
(~4.6K ⭐) to stop using dayjs.The text was updated successfully, but these errors were encountered: