larixsource / angular-react-dates

Angular wrapper component for Airbnb react-dates.
MIT License
25 stars 15 forks source link

Non English locale #1

Open a-jahanshahlo opened 7 years ago

a-jahanshahlo commented 7 years ago

Hi @eldarsil Thank you to develop NG version of 'react-dates'. Please advise me how can I change locate in ng version?

eldarsil commented 7 years ago

Hi @a-jahanshahlo! First of all, sorry for the late. If you want to make any kind of configuration to react-dates, you can define a configuration props object and reference it from the component's attribute props as shown in the demo page (https://larixsource.github.io/angular-react-dates/).

If you want to see all available configuration props please check the official react-dates documentation (https://github.com/airbnb/react-dates/#daterangepicker). If you have any question, I'll be glad to help you.

ghost commented 7 years ago

@a-jahanshahlo This is how I did it - constructor of the component which uses the <angular-date-range-picker>

constructor() {
    moment.locale("de");
    this.defaultProps = {
       .....
    };
}