nhn / tui.calendar

🍞📅A JavaScript calendar that has everything you need.
http://ui.toast.com/tui-calendar
MIT License
11.99k stars 1.29k forks source link

Disable more view popup? #1302

Open Bxnnet opened 2 years ago

Bxnnet commented 2 years ago

Version

latest

Test Environment

Ubuntu, newst TUI Version, Symfony

Current Behavior

Since I can not find any option to customize the 'more view popup' i tried to disable it in order to create my own popup and therefore my idea was a bootstrap modal when clicking the 'x more' title. Works fine but I can not manage to disable the default popup, is there any possiblity to do so?

Expected Behavior

A option to disable the more view popup same as for the other popups.

adhrinae commented 2 years ago

@Bxnnet Unfortunately, we don't have an option to disable the default more view popup at this moment.

You can fork the repo and remove this code(and related code blocks) to disable the more view popup.

Bxnnet commented 2 years ago

@adhrinae Hey, thanks for the answer and solution idea. Basically I dont necessarily need to disable it - that was just my idea to fix an issue: The more view popup gets rendered at a quite crazy location: Screenshot_1

Here is the according html (after my backend calls finish, the calendar is rendered in die div id = calendar container. Screenshot_3

adhrinae commented 2 years ago

Yeah, That's odd.

When the popup shows, the popup's position is affected by the browser's scroll position.

https://github.com/nhn/tui.calendar/blob/main/apps/calendar/src/components/dayGridMonth/gridCell.tsx#L124

Perhaps this calculation brings misbehavior to your application. I can only assume it from your information.

Bxnnet commented 2 years ago

Alright the problem seems to be that I render the calendar inside a bootstrap card deck. (Left side toolbar for calendar navigation, visibility, ... and right side the calendar view). As soon as I move the calendar container to an empty space (where it renders in full width), the popup location gets calculated correctly.

Thanks for helping me finding the issue source but it should be possible, to use the calendar in my wanted way, shouldnt it?

Here is my full HTML in case you are willing to continue assisting me: https://pastebin.com/KseNa5NL

adhrinae commented 2 years ago

it should be possible, to use the calendar in my wanted way, shouldnt it?

I agree. We'll note it as a future requirement but please understand that it won't be added soon since the team behind TOAST UI is taking care of various projects including internal projects.