我正在使用Material UI的Datepicker。问题是Datepicker界面:它是英文的,我想要一个法语界面。
所以这是我的代码:
<DatePicker floatingLabelText="Data de début" onChange={this.onChangeDateDebut} formatDate={this.formatDate} locale="fr"/>
界面保持英文:
我该怎么改变?
谢谢
答案 0 :(得分:4)
将ff道具添加到日期选择器组件
DateTimeFormat={Intl.DateTimeFormat} locale='fr'