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

Add monday first day support #319

Closed

Conversation

haringsrob
Copy link

@haringsrob haringsrob commented Jun 16, 2022

Hey 👋 ,

I could not find a way to set monday to be the first day of the week.

I think this implementation does the job.

See video for a demo
Screen Recording 2022-06-16 at 11 01 50
(individual date pickers can have their own state.)

<x-datetime-picker :monday-first-day="true"/>

fixes #226 226

@PH7-Jack
Copy link
Member

@haringsrob Thanks for contributing. The first day of the week is a great feature, but it's more complex than a boolean option to set only one day of the weekday.
We need to have the ability to set any day as the first day of the week.

@haringsrob
Copy link
Author

Hey @PH7-Jack,

You are right. I did some checking before but must have missed the very few cases where it is not Monday or Sunday.

I believe what would be the best way is to make use of this:

iamkun/dayjs#215 (comment)

However, I have no idea of how to add this to the setup, it could be combined with a global setting or a per field property.

Thoughts?

@PH7-Jack
Copy link
Member

@haringsrob Sure, the dayjs plugins can be used to create this feature if needed.

@PH7-Jack
Copy link
Member

I'm closing this PR for now, we need a complete first-day-of-week solution to prevent futures break changes

@PH7-Jack PH7-Jack closed this Jul 24, 2022
silviokennecke added a commit to silviokennecke/wireui that referenced this pull request Nov 17, 2022
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

Successfully merging this pull request may close these issues.

datetimepicker first day of week
2 participants