-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Comments
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
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
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. |
@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. |
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
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
The text was updated successfully, but these errors were encountered: