-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
fix(VCalendar): calender displayed incorrectly when weekdays changed #20378
base: master
Are you sure you want to change the base?
fix(VCalendar): calender displayed incorrectly when weekdays changed #20378
Conversation
We cannot change the way the adapter works. It needs to remain compatible with date-io: https://github.com/dmtrKovalenko/date-io/blob/4fe384885f7d99119bb4a63d8b9b5c3031bdf22d/packages/core/IUtils.d.ts#L190 |
@blalan05 Hi, thanks for review, so you mean, "getWeekArray" already has the firstDayOfWeek, cannot have one more? |
Right, it can only have one parameter: a JS Date Object, so no we still can't make it all one object. It will need to be handled outside of the adapter. Probably in the Calendar Composable, because VDatePicker would need the same functionality. |
@blalan05 Ok, I can try to fix it in Calendar Composable, but why "firstDayOfWeek" is acceptable? |
I believe this is a temporary bug. It needs fixed. |
Signed-off-by: Hazel <Yihan.Wang@fmr.com>
Signed-off-by: Hazel <Yihan.Wang@fmr.com>
13b9eac
to
928727f
Compare
@blalan05 Hi , I re-commit my change, fixing the issue in composables/calendar.ts. |
Its in the right place, however, you are using the bug in this fix, which I don't think is helpful in the long run. I think this is currently difficult to solve because: each locale has a default firstDayOfWeek, we have the firstDayOfWeek prop and then weekDays array prop. I, initially, wrote it so that weekDays prop does not control order, only visibility. If we have/keep the firstDayOfWeek prop, then I think we should also not allow weekDays to control order. |
@blalan05 I didnt got you point. It make sense if we use the order of the weekDays for calendar, it has default value in Vuetify API, but "first-day-of-week" not. We can modify the API page for "first-day-of-week" to understand that "weekDays" and "first-day-of-week" are mutually exclusive. VCalendar only accept one of them. |
4c970f9
to
6a3285f
Compare
Description
Fix: When changing from "sunday-saturday" to "mon-sun", calender displayed incorrectly.
fixes:#19999
Markup: