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

2 posts, 0 answers
  1. AndersSpetz
    AndersSpetz avatar
    8 posts
    Member since:
    Apr 2016

    Posted 24 May 2017 Link to this post


    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.

  2. Dimitar
    Dimitar avatar
    473 posts

    Posted 26 May 2017 Link to this post

    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.

    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.
Back to Top