mui-x icon indicating copy to clipboard operation
mui-x copied to clipboard

[pickers] Fix date format resolver on `DateTimeRangePickers`

Open arthurbalduini opened this issue 1 year ago • 1 comments

For DateTimeRangePickers the ["day"] case returns an incorrect format, as reported in #14334

arthurbalduini avatar Aug 26 '24 09:08 arthurbalduini

Deploy preview: https://deploy-preview-14341--material-ui-x.netlify.app/

Generated by :no_entry_sign: dangerJS against 6f06e4e8e77ed0376d9fde53cd5f3e3e584738fb

mui-bot avatar Aug 26 '24 09:08 mui-bot

I've adjusted the approach to one that looks more correct to me. I'm not sure why we would have differentiated the behavior based on the presence of value. 🤔

Let me know what you think about the solution. 😉

I assumed that veryfing if the value is an array (date range) would be more clear than adding a new parameter to the function to be used only in DateTimePickers, since the view verification was done in resolveDateFormat(). Let's go with your solution

arthurbalduini avatar Aug 29 '24 11:08 arthurbalduini