question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BUG: Weekly calendar shows TUESDAY as first day on Sundays (with startDayOfWeek = 1)

See original GitHub issue

Version

tui calendar 2.02 (JS)

Test Environment

Brave browser

Current Behavior

On a SUNDAY (today), the calendar shows TUESDAY as the first column of the weekly calendar, and MONDAY is the last.

Today is Sunday, July 10th. When I change the laptop’s date to July 11 (MONDAY), the weekly calendar shows the expected weekly calendar with first column MONDAY and last column SUNDAY. Settings use “startDayOfWeek” = 1:

    var Calendar = window.tui.Calendar;
      var cal = new Calendar('#app', {
        defaultView: 'week',
        isReadOnly: true,
        useDetailPopup: true,
        timezone: { zones: [ { timezoneName: 'Europe/Amsterdam' } ] },
        week: {
          showNowIndicator: false,
          startDayOfWeek: 1,
          hourStart: 8,
          taskView: false,
          narrowWeekend: true,
        },
      });

image

Expected Behavior

On SUNDAY (today, or any day of the week), I expect the first column of the weekly calendar to be MONDAY and SUNDAY the last.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
adhrinaecommented, Jul 11, 2022

@victorvogelpoel Yeah, I got it. It’s definitely not related to the timezone.

So the startDayOfWeek option is broken When the current time is on Sunday.

I’ll investigate the issue and try to fix it. Thanks for the report.

0reactions
victorvogelpoelcommented, Jul 11, 2022

And can you reproduce if you set your computer’s date to July 10th (yesterday Sunday)? I think it will show TUESDAY as the first column then.

The bug was apparent yesterday, Sunday. Then I set my laptop’s date to Monday July 11th, and the week calendar showed Mondays as the first column, as expected.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bug in calendar? Week starts on Tuesday when printing
My 10.10.1 still shows Sunday to Saturday in Calendar view and Monday to Saturday in print preview...... So no need to waste paper....
Read more >
Calendar week begins with sunday independently from locale
Independently of the locale, the calendar week shown e.g. when selecting a date always begins by sunday. As we in germany (UK too,...
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 >
Change the First Day of Week in Blazor Calendar Component
The Calendar provides an option to change the first day of the week by using the FirstDayOfWeek property. Generally, the day of the...
Read more >
How to change the start day of the week that is used on ...
... 5 - THURSDAY, 6 - FRIDAY - For example, setting SWEEK to 1 will make the Start Day of Week to Sunday,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found