Conversation
We have already removed |
I realize moment has been removed from the public API of wp.date which is to my point. With it being a hidden (internal only) implementation, and the reliance of react-dates on I did not test this specifically with other locales because even if its NOT working, its already broken because the |
## Description <!-- Please describe what you have changed or added --> I merged #11649 to master but the changelog entries ended up getting merged to the wrong section.
Description
The
<DateTimePicker/>component (and documentation) describes passing throughlocaleandis12Hourprops through to the<DatePicker />component. However,<DatePicker />does not implement (nor pass through) either of those props. Further,localeis not used anywhere.I'm guessing these are carryovers from before the Date picker refactor.
I think
localeis no longer needed becausereact-dates(which<DatePicker/>has as a dependent) usesmoment.locale()for its localization andwp.dateinitializes moment with the locale via embedded server inline script. However, while this pull doesn't address this, I think this may be something needing addressed at some point because:moment.localefails to be initialized (or moment gets dropped as the date library used bywp.date) then the date-picker will not be localized (and it won't be readily apparent).react-dateshas some user interface strings that don't appear to be localized at all. I'm not sure if this is a biggy because I don't know if we have it configured so any of those strings are shown. If however they are or do get used, they should probably be localized.DateTimedoes not pass through any props to the underlyingreact-datescomponent. It may have been intentional to not expose additional props controlling it to parent components, but in case it wasn't intentional we may want to consider doing so.How has this been tested?
Types of changes
This has minimal impact because the props removed were not being used.
Checklist: