Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report] Cannot read property 'map' of undefined' When using V-calendar when using type "Day" #7155

Closed
vaishali-ghayal opened this issue May 8, 2019 · 2 comments
Labels
C: VCalendar VCalendar T: bug Functionality that does not work as intended/expected

Comments

@vaishali-ghayal
Copy link

Versions and Environment

Vuetify: 1.5.14
Vue: 2.5.18
Browsers: Chrome 73.0.3683.103
OS: Linux x86_64

Steps to reproduce

Set the type to "Day"
Set Weekdays to "Mon-Fri"
Click on "Next" button till Friday
Observe console after Friday for Saturday and Sunday it shows error in console.

Expected Behavior

If Weekdays are choosen from "Mon-Fri" for tupe "Day" after Friday it should go to Monday in one click without error.

Actual Behavior

It shows following error in console

"[Vue warn]: Error in render: 'TypeError: Cannot read property 'map' of undefined'
found in




"

Reproduction Link

https://codepen.io/vaishali-ghayal-the-lessful/pen/qGOaQv?editors=1111

@ghost ghost added the S: triage label May 8, 2019
@nekosaur nekosaur added C: VCalendar VCalendar T: bug Functionality that does not work as intended/expected and removed S: triage labels May 16, 2019
nekosaur added a commit that referenced this issue Jun 26, 2019
there are scenarios where a given start date, end date, and weekdays results
in no days being in range. we should throw a sensible error here instead of
the component just breaking

closes #7155
nekosaur added a commit that referenced this issue Jun 26, 2019
there are scenarios where a given start date, end date, and weekdays results
in no days being in range. we should throw a sensible error here instead of
the component just breaking

closes #7155
@nekosaur
Copy link
Member

So this is actually a user error. When setting weekdays to mon-fri and calendar to daily, we are trying to display a saturday (2019-01-12) which is outside the range of days to show. I have opted to throw an error which should be easier to interpret than the current one.

@vaishali-ghayal
Copy link
Author

@nekosaur Thanks for your response on this. I guess it's not a user error , when day view is selected and days are set to mon-fri and user click on next button og calendar and if it's Saturday or Sunday it should not through error I guess it should go to Monday directly.

nekosaur added a commit that referenced this issue Jun 26, 2019
just throwing an error will not work since using next/prev functions
should be able to go to a new day in the week

closes #7155
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VCalendar VCalendar T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

No branches or pull requests

2 participants