Skip to content

Calendar premium views - Bugfixes #807

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

Merged
merged 3 commits into from
Apr 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Bugfixes for Mobile Date Selector
  • Loading branch information
FalkWolsky committed Apr 13, 2024
commit a9c4ef7f6f272bb97ee161a00a45776c2ea7a31c
Original file line number Diff line number Diff line change
Expand Up @@ -441,28 +441,7 @@ let CalendarBasicComp = (function () {
plugins={filteredPlugins}
headerToolbar={toolBar(currentView)}
resourceAreaHeaderContent={resourceName}
moreLinkClick={(info) => {
let left = 0;
const ele = info.jsEvent.target as HTMLElement;
if (info.view.type === ViewType.DAY) {
if (info.allDay) {
left = ele.offsetParent?.parentElement?.offsetLeft || 0;
} else {
left = ele.parentElement?.offsetLeft || 0;
}
} else {
if (info.allDay) {
left =
ele.offsetParent?.parentElement?.parentElement?.offsetLeft ||
0;
} else {
left =
ele.offsetParent?.parentElement?.parentElement?.parentElement
?.offsetLeft || 0;
}
}
setLeft(left);
}}

buttonText={buttonText}
schedulerLicenseKey={licenseKey}
views={views}
Expand Down Expand Up @@ -493,6 +472,28 @@ let CalendarBasicComp = (function () {
editEvent.current = undefined;
}, 500);
}}
moreLinkClick={(info) => {
let left = 0;
const ele = info.jsEvent.target as HTMLElement;
if (info.view.type === ViewType.DAY) {
if (info.allDay) {
left = ele.offsetParent?.parentElement?.offsetLeft || 0;
} else {
left = ele.parentElement?.offsetLeft || 0;
}
} else {
if (info.allDay) {
left =
ele.offsetParent?.parentElement?.parentElement?.offsetLeft ||
0;
} else {
left =
ele.offsetParent?.parentElement?.parentElement?.parentElement
?.offsetLeft || 0;
}
}
setLeft(left);
}}
eventsSet={(info) => {
let needChange = false;
let changeEvents: EventType[] = [];
Expand All @@ -517,7 +518,6 @@ let CalendarBasicComp = (function () {
}
});
if (needChange) {
// props.events.onChange(changeEvents);
props.onEvent("change");
}
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ const handleClick = async (
MobileDatePicker.prompt({
getContainer: () => document.querySelector(`#${CanvasContainerID}`) || document.body,
mouseWheel: true,
cancelText: trans("cancel"),
confirmText: trans("ok"),
destroyOnClose: true,
closeOnMaskClick: true,
min: min.isValid() ? min.toDate() : undefined,
Expand Down