-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
refactor: Replace 7 by WEEK_DAYS #1225
Conversation
I am using a calendar view of 4 weeks in one long row. For this I needed to increase WEEK_DAYS. However, I found out that in this line of code the number of days per week is still hardcoded instead of relying on the WEEK_DAYS constant.
@HansSchouten So did you fork the repo and modified the |
Yes that is correct, I needed an opensource version of Bryntum Scheduler but found out these do not exist. And then I enabled the weekly view and applied the following week configuration: week: {
showTimezoneCollapseButton: false,
timezonesCollapsed: true,
narrowWeekend: false,
taskView: false,
} And next I applied the following style: .toastui-vue-calendar {
min-width: 2000px;
}
.toastui-calendar-time,
.toastui-calendar-week-view-day-names,
.toastui-calendar-panel-resizer {
display: none;
}
.toastui-vue-calendar:first-of-type {
.toastui-calendar-week-view-day-names {
display: block;
}
}
.toastui-calendar-day-name-container {
margin-left: 305px !important;
}
.toastui-calendar-panel-title {
width: 300px !important;
box-sizing: border-box;
display: table;
}
.toastui-calendar-template-alldayTitle {
display: table-cell;
vertical-align: middle;
text-align: right;
white-space: normal;
font-size: 13px;
padding-right: 8px;
}
.toastui-vue-calendar:nth-of-type(even) > div {
background: #f8f9fa !important;
}
.toastui-calendar-panel-grid {
border-right: 1px solid #eee !important;
} And not all of this is actually needed, parts of it is my personal preference. However, instead of modifying the WEEK_DAYS constant and use my separate repo clone is there a way to make a setting for this? |
Sounds amazing 👍
We don't offer those features currently, so I think your approach is pretty clever. There are several requests such as drawing several weeks in a row. We haven't had an idea to implement this feature yet, however, your approach gave me an idea. Maybe we can add an option to set |
Ok, glad to see it could be of help to others as well. |
Options are stored in the state management store for components. and every component can get those options through the So components should bring the I assume that it needs major refactoring, so I'll just consider it later. At least I can introduce this conversation to the discussion board for others. |
Thanks for the explaination, for now it works for me as well, but great to include it in future conversations. |
Please check if the PR fulfills these requirements
fix #xxx[,#xxx]
, where "xxx" is the issue number)Description
I am using a calendar week view with 4 weeks of events in one long row. For this I needed to increase WEEK_DAYS. However, I found out that in this line of code the number of days per week is still hardcoded instead of relying on the WEEK_DAYS constant.
Thank you for your contribution to TOAST UI product. 🎉 😘 ✨