Wrong week date range in calendar header when using week start as middle day of week
See original GitHub issueDescribe the bug
I am using below code to show week date range in week view header.
<div class="col-md-4 text-center">
<h3>{{ viewDate | calendarDate: view + 'ViewTitle':locale }}</h3>
</div>
I have configured week view as below.
<mwl-calendar-week-view [hourSegments]="2" [weekStartsOn]="4" [viewDate]="viewDate"
[events]="events" [dayStartHour]="6" [dayEndHour]="18">
</mwl-calendar-week-view>
Week start is Thursday and end is Wednesday. Week view calendar show the correct week start and end dates. But header component shows wrong date range for week.
Week range should be Jul 18 - Jul 24, 2019. But, as in the below image it displays as Jul 21 - Jul 27, 2019
How can I fix this?
Minimal reproduction of the problem with instructions
Here is the Stackblitz
Screenshots
Versions
@angular/core
: 6.1.7angular-calendar
: 0.27.14- Browser name and version: Google Chrome Version 75.0.3770.142 (Official Build) (64-bit)
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Wrong week date range in calendar header when ... - GitHub
Week start is Thursday and end is Wednesday. Week view calendar show the correct week start and end dates. But header component shows...
Read more >Week starting on Monday - Tableau Community
Right click on the Data Source. 2. Navigate to Date Properties. 3. Here you can change Week Start day, Fiscal year start and...
Read more >Set the first day of the calendar week and change calendar ...
By default, the work week is defined as Monday through Friday with a work day of 9 A.M. to 5 P.M. The first...
Read more >Excel WEEKNUM function – convert week number to date and ...
Formula examples demonstrate how you can use the WEEKNUM function to calculate week numbers in Excel - convert week number to date, get...
Read more >The Ultimate Guide To Google Calendar
The first general settings are straightforward. You can change the day on which you start the week, choose to use the device's time...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You need to pass the
weekStartsOn
as an argument to thecalendarDate
pipe, so that it knows about it:I’ll update the docs to make this more clear as it’s come up a few times now and it’s quite confusing.
Thanks for the update. With this modification, now show the correct week date range in the header.