vanilla-calendar-pro icon indicating copy to clipboard operation
vanilla-calendar-pro copied to clipboard

feat: change weekend days, fixes #283

Open ghiscoding opened this issue 1 year ago • 1 comments

setting to allow changing weekend days, for example Friday/Saturday instead of Saturday/Sunday as per Discussion #283

image

However, it's currently broken when enabling iso8601: true, that would have to be fixed but I don't have more time to look into this. There's also probably a lot more code that calculate days/weekends somewhere else, so it's quite possible that I didn't cover everything. I assume that the iso8601 could probably be ignored but we would probably also need another setting to know which day is the starting (for example start on Sunday or Monday or even Tuesday)

image

ghiscoding avatar Aug 08 '24 05:08 ghiscoding

This PR could be closed if not interested, I don't have time to work further on this anyway. It was just a quick test to see if what was asked in Discussion #283 is even possible. It kinda is possible (as shown above), but I'm not sure if you really would want to provide such feature... so feel free to close (or improve the PR and implement it as you see fit). Personally I would have preferred a setting like weekDayStart that could be anywhere from 0 to 6 instead of using iso8601, but changing the code at this point would be a breaking change, unless we support both which might be a bit tricky.

Cheers

ghiscoding avatar Aug 08 '24 05:08 ghiscoding

@ghiscoding @uvarov-frontend this is great! thanks for doing an exploration on this:)

johanrd avatar Oct 22 '24 13:10 johanrd

Implemented in v3.0.0 #293

uvarov-frontend avatar Oct 24 '24 13:10 uvarov-frontend