calendar icon indicating copy to clipboard operation
calendar copied to clipboard

Cant reduce Event duration

Open AdrianGzzEsc opened this issue 2 years ago • 9 comments

After expanding the event its not possible to reduce it to one day, you can still expand it and short it but only into minimum 2 days

AdrianGzzEsc avatar Jun 21 '22 20:06 AdrianGzzEsc

Hi @AdrianGzzEsc

Thanks for reporting the issue. I can't reproduce it, but I can guess what you're facing. Could you please provide the exact start and end time of the event you are resizing?

vkurko avatar Jun 22 '22 05:06 vkurko

The issue is also in the demo, try expanding an event and then reduce it to one day and you cant. Im about to go to sleep but if you need more information I’ll email you tomorrow

El El mié, 22 jun 2022 a las 0:28, Vladimir @.***> escribió:

Hi @AdrianGzzEsc https://github.com/AdrianGzzEsc

Thanks for reporting the issue. I can't reproduce it, but I can guess what you're facing. Could you please provide the exact start and end time of the event you are resizing?

— Reply to this email directly, view it on GitHub https://github.com/vkurko/calendar/issues/46#issuecomment-1162658614, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHUKJSUKHGQDK3KUA6GUZTDVQKP7ZANCNFSM5ZNV64HQ . You are receiving this because you were mentioned.Message ID: @.***>

AdrianGzzEsc avatar Jun 22 '22 05:06 AdrianGzzEsc

Ok. The point is that now in the month view, changes always occur in the form of plus or minus 1 day. Thus, if an event starts at 4pm and ends at 9am the next day, then it cannot be reduced by 1 day, because its duration is already less than 1 day.

The obvious solution would be to allow the end of the event to be reduced to, say, 5pm in this case, but in that case we will lose the original duration of the event as soon as we reduce it to the minimum value. That is, by reducing and then increasing the event, we will not get the original duration. I hope this makes sense.

What solution do you think would be the right one for such cases?

vkurko avatar Jun 22 '22 06:06 vkurko

My bad, I see that it is working fine. It was just in does cases which makes sense not being able to reduce it.

On Wed, Jun 22, 2022 at 1:03 AM Vladimir @.***> wrote:

Ok. The point is that now in the month view, changes always occur in the form of plus or minus 1 day. Thus, if an event starts at 4pm and ends at 9am the next day, then it cannot be reduced by 1 day, because its duration is already less than 1 day.

The obvious solution would be to allow the end of the event to be reduced to, say, 5pm in this case, but in that case we will lose the original duration of the event as soon as we reduce it to the minimum value. That is, by reducing and then increasing the event, we will not get the original duration. I hope this makes sense.

What solution do you think would be the right one for such cases?

— Reply to this email directly, view it on GitHub https://github.com/vkurko/calendar/issues/46#issuecomment-1162680156, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHUKJSQ36GMPMMNEHGS7VSLVQKUCTANCNFSM5ZNV64HQ . You are receiving this because you were mentioned.Message ID: @.***>

AdrianGzzEsc avatar Jun 22 '22 17:06 AdrianGzzEsc

Yes, but anyway, I think the calendar behavior is really non-obvious in such cases.

I'll leave this ticket open, maybe there will be an idea how to improve the behavior. For example, FullCalendar seems to allow only all-day events to be resized in month view.

vkurko avatar Jun 23 '22 05:06 vkurko

Maybe just grab the end date and subtract one day, so If it starts 2022-06-23 9:00am and ends 2022-06-24 5:30pm if you reduce it to a one day event then end date = 2022-06-23 5:30pm. But the problem will be an event that ends before 24hrs for example: starts 2022-06-23 9:00am and ends 2022-06-24 7:00am. Since you can drag and change duration maybe just make it end at 23:59 if end date < start date of the day and then user should change the time duration by drag in it.

AdrianGzzEsc avatar Jun 23 '22 13:06 AdrianGzzEsc

If it starts 2022-06-23 9:00am and ends 2022-06-24 5:30pm if you reduce it to a one day event then end date = 2022-06-23 5:30pm.

This is exactly how it works now.

maybe just make it end at 23:59 if end date < start date

This is similar to what I wrote above. In this case, we are faced with the non-obvious result that by reducing and then increasing the event, we will not get the original duration.

vkurko avatar Jun 23 '22 13:06 vkurko

I'm using this calendar as a production plan, so I have many events in one day with the same start and end date. A behaviour I would like is to span the title in just one square if event.start == nextEvent.start && event.end== nextEvent.end && event.backgroundColor == nextEvent.backgroundColor. The titles are no longer visible in day view since there's like 12 in one day so that could help me. Right now what I did was onClickEvent its shows a popup with the title. My titles are about 60 characters on length. Or if you can point me in the right direction to make this happen also appreciate it.

On Thu, Jun 23, 2022 at 8:34 AM Adrian Gonzalez < @.***> wrote:

Maybe just grab the end date and subtract one day, so If it starts 2022-06-23 9:00am and ends 2022-06-24 5:30pm if you reduce it to a one day event then end date = 2022-06-23 5:30pm. But the problem will be an event that ends before 24hrs for example: starts 2022-06-23 9:00am and ends 2022-06-24 7:00am. Since you can drag and change duration maybe just make it end at 23:59 if end date < start date of the day and then user should change the time duration by drag in it.

AdrianGzzEsc avatar Jun 23 '22 14:06 AdrianGzzEsc

@AdrianGzzEsc, if you can prepare a JS Bin (or similar) example, then maybe I can help you.

vkurko avatar Jun 23 '22 17:06 vkurko

I'll leave this ticket open, maybe there will be an idea how to improve the behavior. For example, FullCalendar seems to allow only all-day events to be resized in month view.

I'm closing this ticket for the time being with the possibility of reopening it if necessary.

vkurko avatar Mar 29 '23 09:03 vkurko