Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the language #13

Open
luispedrocosta opened this issue Apr 7, 2017 · 5 comments
Open

Change the language #13

luispedrocosta opened this issue Apr 7, 2017 · 5 comments

Comments

@luispedrocosta
Copy link

Hi, I´m trying to integrate your datepicker into my angular 2 project, can you tell me if it is possible to change the names of the months, and if yes where?

Thank you

@jkuri
Copy link
Owner

jkuri commented Apr 7, 2017

hi. did you checked the readme?

@luispedrocosta
Copy link
Author

I did but I didn't found where to change the names of the months

@jkuri
Copy link
Owner

jkuri commented Apr 7, 2017

oh yes, I switched with day names. you can make a PR for months if you have time and I will accept it.

@brada1703
Copy link

brada1703 commented Jun 4, 2017

Is there anyway that we could change the name dynamically?

In understand that we can change them statically under:

  ngOnInit() {
    this.options = {
      ...
      dayNames: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
      ...
    };

However, I am using ngx-translate, which allows me to change the text dynamically in the HTML.

For example,

<a [routerLink]="'/therooms' | localize" [routerLinkActive]="['router-link-active']">
{{'ROOMS' | translate}}
</a>

In other words, can I break down the daterangepicker to put more of the package into the HTML to allow me to make this type of dynamic change, or would there be a way to do this within the Typescript?

Thanks!

@Marineau
Copy link

Hi. I'm also looking for a way to change the month names, solutions by dateFns doesnt seems to work on Angular 5, I'm out of ideas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants