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
The global format settings are merged with the parameters passed to the pipe. This causes errors in the date pipe when dateStyle is set in the global config and you want to use options like year or month, and vice versa. Passing undefined for parameters set in global config is possible, but that is not a clean way.
Expected behavior
The pipe parameters to override the global format config, not be merged with it.
Minimal reproduction of the problem with instructions
Please check this StackBlitz playground. If you remove dateStyle: undefined and timeStyle: undefined, you will get an error.
Additional context
I understand that this may be a breaking change and require a major version release.
Contribution
I would like to make a pull request for this feature:
[x] Yes! 🚀
[ ] Maybe next time
The text was updated successfully, but these errors were encountered:
armanozak
changed the title
Bug: Merging global format settings with pipe parameters cause errors in date pipe
Merging global format settings with pipe parameters cause errors in date pipe
Sep 3, 2021
Current behavior
The global format settings are merged with the parameters passed to the pipe. This causes errors in the date pipe when
dateStyle
is set in the global config and you want to use options likeyear
ormonth
, and vice versa. Passingundefined
for parameters set in global config is possible, but that is not a clean way.Expected behavior
The pipe parameters to override the global format config, not be merged with it.
Minimal reproduction of the problem with instructions
Please check this StackBlitz playground. If you remove
dateStyle: undefined
andtimeStyle: undefined
, you will get an error.Additional context
I understand that this may be a breaking change and require a major version release.
Contribution
I would like to make a pull request for this feature:
[x] Yes! 🚀
[ ] Maybe next time
The text was updated successfully, but these errors were encountered: