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

[Feature Request] output event information when you click on the event (for details of the event) #19624

Open
Jang-Eun-Ji opened this issue Apr 17, 2024 · 1 comment · May be fixed by #19568
Assignees

Comments

@Jang-Eun-Ji
Copy link

Problem to solve

If you click an event in the calendar, you can't figure out which event you clicked on, so you can't implement functions such as event details

Proposed solution

If you check the number of index events that you click on the screen and import the event data every month from the server in the order of the fastest event (if the event start time is the same, the event's creation time comes first in front of the index), you can see the properties of the event you clicked on

@blalan05 blalan05 self-assigned this Apr 18, 2024
@blalan05 blalan05 added C: VCalendar VCalendar and removed S: triage labels Apr 18, 2024
@blalan05 blalan05 linked a pull request Apr 18, 2024 that will close this issue
@Jang-Eun-Ji
Copy link
Author

Jang-Eun-Ji commented Apr 19, 2024

I wanted to click on an event and get the details of that event, but it was hard to retrieve the details of the clicked event,
so I couldn't call the server to get the specific event details that I clicked on.
Here is my solution for this:
I just count the 'v-chip__content' (in month-day format) on the screen.
When you fetch monthly data from the server, if you retrieve it sorted by date and time,
you can know which event you are currently clicking on.
This is the code to find the index of the event on the screen and print it with console.log.
Just so you know, my current code is a temporary solution until Vuetify further develops the data format for the calendar.

findElementIndex(event) {
      const clickedElement = event.target.closest('.v-chip__content');
      if (!clickedElement) {
        console.log('Clicked element is not a .v-chip__content element');
        return;
      }
      const allElements = Array.from(document.querySelectorAll('.v-chip__content'));
      const elementIndex = allElements.indexOf(clickedElement);
      console.log('Clicked .v-chip__content Element Index:', elementIndex);
    }

@Jang-Eun-Ji Jang-Eun-Ji linked a pull request Apr 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants