When I change my moment.locale() the days of the calendar update but month names don't unless I completely re-render my page. Is there something special about the way that calendar months are handled that I'm missing?

It seems we should probably be caching and checking the moment locale in shouldComponentUpdate (and anything else stateful about the moment singleton) on all our components.
@oldo how do you change the moment.locale()?
I'm trying a way to do it as well, but I don't find how .-.
Hi @willianribeiro, have you looked at https://github.com/airbnb/react-dates/blob/master/stories/DateRangePicker.js#L67?
Thank you @majapw, it is easier than I have thought (-;
If anyone is still struggling to get the month names to translate when switching back and forth between different locales, I came up with a workaround. Add the following as a prop to DateRangePicker:
// `language` being the desired locale
renderMonthElement={({ month }) => moment(month).locale(language).format('MMMM YYYY')}
The moment objects internal to the component don't seem to get updated when changing moment's locale (even a re-render doesn't fix it). Hope it helps!
Workaround from @ian-rudge works! 馃殌
But I am having same issue with month representation in the input. Any workaround for that?
a medal of honor to @ian-rudge
@ian-rudge You are awesome
Thanks :)
Most helpful comment
If anyone is still struggling to get the month names to translate when switching back and forth between different locales, I came up with a workaround. Add the following as a prop to
DateRangePicker:The moment objects internal to the component don't seem to get updated when changing moment's locale (even a re-render doesn't fix it). Hope it helps!