Anaïs Saez
Anaïs Saez

Reputation: 1339

Locale fr on datepicker Material UI

I'm using Datepicker of Material UI. Problem is the Datepicker interface : it's in English, and I want a french interface.

So this is my code :

<DatePicker floatingLabelText="Data de début" onChange={this.onChangeDateDebut} formatDate={this.formatDate} locale="fr"/>

And the interface stays in English :

Datapicker english interface

How can I change this ?

Thank you

Upvotes: 3

Views: 4526

Answers (1)

dynamo
dynamo

Reputation: 1153

Add the ff props to the date picker component

DateTimeFormat={Intl.DateTimeFormat} locale='fr'

Upvotes: 5

Related Questions