Skip to content

Conversation

gui-ant
Copy link

@gui-ant gui-ant commented Mar 16, 2022

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.

>
<span
class="line"
v-show="kalendar_options.style === 'material_design'"
></span>
<!-- kalendar_options.style === 'material_design' && passedTimeVisible -->
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To delete

@gui-ant gui-ant changed the title hide hour indicator when it's out of day interval Hide hour indicator when it's out of day interval Mar 16, 2022
@gui-ant gui-ant changed the title Hide hour indicator when it's out of day interval Hide hour indicator when it's out of day bounds Mar 16, 2022
@altinselimi
Copy link
Owner

@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 ?

@gui-ant
Copy link
Author

gui-ant commented Apr 21, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants