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

How to start Week from Monday? #3

Open
ATM-NET opened this issue Feb 19, 2020 · 3 comments
Open

How to start Week from Monday? #3

ATM-NET opened this issue Feb 19, 2020 · 3 comments

Comments

@ATM-NET
Copy link

ATM-NET commented Feb 19, 2020

No description provided.

@fantostisch
Copy link

You should move

after Saturday and replace
let firstDay = (new Date(year, month)).getDay();
with

let firstDay = (((new Date(year, month)).getDay() - 1) + 7) % 7;

For a live example of this you can look at https://verhuurkalender.hubovra.nl/

@mah3uz
Copy link

mah3uz commented Feb 3, 2021

Thanks a lot @fantostisch It saves my day.

@niyazidageek
Copy link

niyazidageek commented Jun 30, 2022

You will just want to change this part:

Screen Shot 2022-07-01 at 12 41 16 AM

Here, you just change the numbers in the loops as shown in the screenshot. Also, do not forget to change that number inside if() condition.

Then, you will want to change this in the HTML:

Screen Shot 2022-07-01 at 12 43 17 AM

So what I did was just changing the order of th tags.

I hope I helped you out! In case I did not, you can always mention me here in the discussion and I will definitely help you out!

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