This is a migrated thread and some comments may be shown as answers.

Adaptive week/workweek views sometimes select wrong timeslot in some resolutions

1 Answer 51 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
AndersSpetz
Top achievements
Rank 1
AndersSpetz asked on 24 May 2017, 07:36 AM

Hello,

when using the mobile version of the mentioned views there seems to be some calculation error when trying to select time slots. The calendar is configured with create disabled but selection enabled, so that the user can touch a time slot to select it. When the area to the left of the time slots (groupings, allday-label, etc) has certain widths, some days of the week becomes unselectable. Instead, the day before gets selected.

I have dug into the problem and seen that in these cases, the right edge of the time slot before is one pixel greater than the left edge of the time slot touched. Furthermore, the touch event gets rounded to the leftmost value of the touched time slot. This makes the select criteria to evaluate as true for both slots, and the "first" of them will be selected.

The problem is experienced on an iPad in portrait orientation, but it is possible that other resolutions is affected as well. 

Here is a more descriptive example of what happens, the slots is represented with || and the numbers are the coordinates of the egdes:

|| 100                                 210||209                             300||300                                       410||

When selecting the second time slot, the touch is rounded to 209, which will is considered inside the span of 100 <= 209 < 210, and the first slot is selected.

Some floating point error at play here perhaps?

Sorry for the long post, hope that it was helpful though.

Best regards.

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 26 May 2017, 06:49 AM
Hello Anders,

Could you provide a snippet for reproduction of this issue? It seems that it is reproducible only when specific conditions are met and I am not able to reproduce it on my side on iPad.

Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Scheduler
Asked by
AndersSpetz
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or