kalendar
kalendar copied to clipboard
Hide hour indicator when it's out of day bounds
Related to and possibly closes issue #52:
The passedTime()
function was returning null when current time was out of day bounds. So, distance
prop was not exists.
Changed to return the same {distance, time}
object, but with distance value as -1.
Hour line is shown only when passes passedTimeVisible
guard, added as computed prop.
@guiantz I am not sure I understand the issue. How can day be out of bounds ? Can you do a codesandbox reproduction of the issue ?
The issue occurs when you define a partial period of day (e.g. 13pm-16pm) and the calendar is rendered on a time out of that interval (e.g. 12pm). This makes function passedTime() returning null, what will cause an exception when the position of the timeline is calculated. On the demo sample the available hours are defined to all day, so this issue never occurs.