-
Notifications
You must be signed in to change notification settings - Fork 1
Adding support for start of week day in "Week view". #7
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In place of explicitly mentioning "Mon" | "Tue" | "Wed" | "Thu" | "Fri" | "Sat" | "Sun" everywhere, create a enum for that in calendar.ts file, then you can use it here like On top - startOfWeek: Weeks |
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Create a enum for Weeks here, reference below - export enum Weeks { Then everywhere - |
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same goes for here - startOfWeek?: Weeks; |
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same goes for here - startOfWeek ?? Weeks.SUNDAY |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use the Weeks enum here as well
On top -
import type { CalendarEvent, Weeks } from "@/types/calendar";
startOfWeek = Weeks.SUNDAY,