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

Support for weekStart and dayjs().weekday() #9

Open
Vakme opened this issue Feb 14, 2022 · 2 comments
Open

Support for weekStart and dayjs().weekday() #9

Vakme opened this issue Feb 14, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@Vakme
Copy link

Vakme commented Feb 14, 2022

Hi, I'm using your calendar in one of my projects and it works great! It's fast and easy to use. Hovewer, I have small feature request.

Currently, the calendar shows weeks starting on Sunday, which is default behavior for dayjs without plugins.

However, dayjs supports weekStart option (in locale configuration - iamkun/dayjs#215) and locale aware weekday (https://day.js.org/docs/en/get-set/weekday).

Is is possible to add support for Weekday plugin and customize the start and the end of the week? It might be enough to setup the plugin and change day.day() to day.weekday()

Currently, in my project I have week view (my own implementation using dayjs) and month view (using your calendar). In week view I'm starting the week on Monday (using Weekday plugin and dayjs().weekday()) and I'd like to have both views working as similarly as possible.

Best regards!

@Vakme Vakme added the enhancement New feature or request label Feb 14, 2022
@aryella-lacerda
Copy link
Owner

Hello @Vakme! Let me take a look at the best way to extend the calendar's API to make this possible 😁 Shouldn't be a very difficult adjustment, I'll keep you posted.

@johankorger
Copy link

Hi, I'm using to your calendar and thank you, it works great.
Do you have any information regarding the cited implementation ? Indeed, I am also interested.

Best regards!

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

No branches or pull requests

3 participants