Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Need to translate the time picker

marrielle.aboujaoude free asked 4 years ago


https://mdbootstrap.com/docs/react/forms/date-picker translate the time picker to Vietnamese language


Piotr Glejzer staff commented 4 years ago

you can use props like okLabel, todayLabel to change the names of labels etc


marrielle.aboujaoude free commented 4 years ago

but what i need is to translate the months to vietnamese, how can I do that?


Piotr Glejzer staff commented 4 years ago

did you try to use props locale? https://mdbootstrap.com/docs/react/forms/date-picker/#docsTabsAPI


marrielle.aboujaoude free commented 4 years ago

                            <MDBDatePicker
                                className="add-campaign-datepickers"
                                getValue={value => this.getPickerValue("endDate", value)}
                                id="endDate"
                                name="endDate"
                                format="YYYY-MM-DD"
                                valueDefault={this.state.endDate}
                                value={this.state.endDate}
                                label={translateFn("End Date")}
                                okLabel = {translateFn("Ok")}
                                locale={moment.locale('ar')}
                            />

i'm using this not working


Piotr Glejzer staff commented 4 years ago

What's not working? I used locale and this is translate langugae to arabic



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Opened

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.27.0
  • Device: desktop
  • Browser: chrome
  • OS: windows
  • Provided sample code: No
  • Provided link: Yes