tomosterlund / qalendar

Event calendar and date picker for Vue 3
https://tomosterlund.github.io/qalendar/
MIT License
269 stars 53 forks source link

On mobile view there's difficulty in selecting a day / event. #233

Closed tabish-ali closed 8 months ago

tabish-ali commented 9 months ago

Hi, I have installed your calendar for my project, really liked it. I can customize it by overriding CSS. But I found a problem which is causing issue for mobile users and even web users if they increase the day font size.

So let's go to issue without further wasting time.

So problem was when I clicked or tap the day on calendar it does not select the day unless I click on empty space around the day number. There's span in box that represent day number, it does not select the day if clicked on span. It Only select it when clicked on empty space around it. So it's very frustrating for mobile users, due to small screen size they can't select day easily.

Image is attached for your convenience.

Screenshot 2024-01-31 181555

GitTheCodeAndHitTheRoad commented 9 months ago

I am running into the same issue

golam-sorwar commented 9 months ago

I encountered the same issue on mobile view. After applying the custom CSS, the issue has been resolved for me.

span.calendar-month__day-date {
  z-index: 1;
  pointer-events: none;
}
GitTheCodeAndHitTheRoad commented 9 months ago

I encountered the same issue on mobile view. After applying the custom CSS, the issue has been resolved for me.

span.calendar-month__day-date {
  z-index: 1;
  pointer-events: none;
}

Nice solution, perhaps we can make it to be the default value for that css property.

GitTheCodeAndHitTheRoad commented 9 months ago

Where exactly did you put the custom css? Did you change it in the _nodemodules.dist.src.style.css? If I put it simply in the style section it does not work for me:

<style>
@import "qalendar/dist/style.css";
.v-card__actions {
  padding: 3px;
}

.span.calendar-month__day-date {
  z-index: 1 !important;
  pointer-events: none !important ;
}
</style>
golam-sorwar commented 9 months ago

<style>
@import "qalendar/dist/style.css";
.v-card__actions {
  padding: 3px;
}

span.calendar-month__day-date {
  z-index: 1 !important;
  pointer-events: none !important ;
}
</style>

try this way remove dot(.) before span

GitTheCodeAndHitTheRoad commented 9 months ago
span.calendar-month__day-date {
  z-index: 1;
  pointer-events: none;
}

Ah that was it, thanks!

It solved the issue of clicking on days without events. Adding the following also solves clicking on days with events (on mobile):

div.calendar-month_events {
  z-index: 1;
  pointer-events: none;
}

EDIT:

should be:

div.qalendar-is-small div.calendar-month_events {
z-index: 1;
pointer-events: none;
}

otheriwse the events are not clickable anymore on large screens.

tomosterlund commented 8 months ago

Hey there. Thanks for opening this and coming up with working workarounds. I'll have a look into this :)