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

dayStart and dayEnd for cal_week_options #47

Open
royfrancis opened this issue Apr 26, 2024 · 4 comments
Open

dayStart and dayEnd for cal_week_options #47

royfrancis opened this issue Apr 26, 2024 · 4 comments

Comments

@royfrancis
Copy link

Is it possible to have dayStart and dayEnd for cal_week_options()?

@pvictor
Copy link
Member

pvictor commented Apr 29, 2024

Those are not valid options according to docs : https://nhn.github.io/tui.calendar/latest/CalendarCore
What are you trying to achieve ?

@royfrancis
Copy link
Author

royfrancis commented Apr 29, 2024

You are right because I just made it up 😄
cal_week_options() has hourStart and hourEnd which nicely sets a vertical limit for what is displayed. Similarly, it would be nice if I could set limits horizontally (days) as well. Some way to hide/grey out days that's not part of the schedule.

Screenshot 2024-04-29 at 12 49 43

I have the navigation on because this schedule spans two weeks. Maybe there is a way to display two whole weeks in a single view. If so, then I could remove navigation and there is no need for horizontal limits.

@pvictor
Copy link
Member

pvictor commented Apr 29, 2024

Ok, thanks I understand.
In week view, you can remove weekend, but not friday with:

calendar(view = "week") %>%
  cal_week_options(workweek = TRUE)

In month view you can display only two weeks and also remove weekend:

calendar(view = "month") %>%
  cal_month_options(visibleWeeksCount = 2, workweek = TRUE)

@royfrancis
Copy link
Author

royfrancis commented Apr 29, 2024

Ok. So it seems like I need options from both cal_week_options() and cal_month_options() for my plan to work, because I need 'week' view but only want to display 2 weeks.

calendar(dfr, view="week", navigation=TRUE, defaultDate=as.Date("2024-06-10")) %>%
  cal_week_options(startDayOfWeek = 1, hourStart=8, hourEnd=21, showNowIndicator = TRUE) %>%
  cal_month_options(visibleWeeksCount = 2)

I think month options don't apply to week view. So this might not be possible at the moment.

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

No branches or pull requests

2 participants