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

Date of weekview is not updated, when weekStartsOn is not sunday #868

Closed
duck74 opened this issue Jan 28, 2019 · 11 comments
Closed

Date of weekview is not updated, when weekStartsOn is not sunday #868

duck74 opened this issue Jan 28, 2019 · 11 comments
Labels

Comments

@duck74
Copy link

duck74 commented Jan 28, 2019

Describe the bug
When I update the weekStartsOn to a different day, in the week view the date in the header is still showing the days from Sunday to Saturday

Minimal reproduction of the problem with instructions
you can also see it here in the examples:
https://mattlewis92.github.io/angular-calendar/#/i18n

Here the week starts on Monday but the date in the header still is the Sunday date

Screenshots

Versions

  • @angular/core:
    Angular CLI: 7.0.3
    Node: 11.3.0
    OS: darwin x64
    Angular: 6.1.4
  • angular-calendar: "angular-calendar": "^0.26.4"
  • Browser name and version: Mac OS: Chrome Version 71.0.3578.98 (Official Build) (64-bit)
@mattlewis92 mattlewis92 added the bug label Feb 3, 2019
@Jab0rnal
Copy link

Ah, I've just come across this. Id hoped that i was doing something wrong. Any news on a fix?

@mattlewis92
Copy link
Owner

Fixed in 0.26.8! 😄

@Kherat
Copy link

Kherat commented Apr 17, 2019

"angular-calendar": "^0.26.11",
But is not fixed and local cuz error in publish

@duck74
Copy link
Author

duck74 commented Apr 17, 2019

Kherat is right, it did not work when I tried it, I came up with a workaround, but will try it again

@Kherat
Copy link

Kherat commented Apr 17, 2019

waiting for a good solution...

@mattlewis92
Copy link
Owner

Screenshot 2019-04-17 at 18 32 50

It's working for me, can someone make a repro on stackblitz?

@Kherat
Copy link

Kherat commented Apr 17, 2019

22

Should I have to add specific code or just update version?

@duck74
Copy link
Author

duck74 commented Apr 17, 2019

Just checked my app and its now on version 0.27.3 but still shows the same error.
this is my calendar header component entry:

  <h3> {{ viewDate | calendarDate:(view + 'ViewTitle'):locale }}</h3>

I have the German locale.
Screen Shot 2019-04-17 at 13 12 26

@mattlewis92
Copy link
Owner

Ahh I see now, so you need to pass the weekStartsOn to the header pipe and it'll solve your problem 😄

{{ viewDate | calendarDate:(view + 'ViewTitle'):locale:weekStartsOn }}

@duck74
Copy link
Author

duck74 commented Apr 17, 2019

OK thanks, it is working now (I also had to add the Input in the header component as well as to adapt the calendar-header in the html of the calendar component (just in case someone else is having the same problem :) )
Thanks a lot for the help!

@Kherat
Copy link

Kherat commented Apr 17, 2019

when I add this line
{{ viewDate | calendarDate:(view + 'ViewTitle'):locale:weekStartsOn }}
i got error about local while publishing project.

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

No branches or pull requests

4 participants