But I get this error after I choose dates, close the mat-menu and try to open the mat-menu again:
Cannot read property '0' of null
at AnimatepickerComponent.getNextMonthArray (ngx-animating-datepicker.js:1081)
at AnimatepickerComponent.goToDate (ngx-animating-datepicker.js:988)
at AnimatepickerComponent.set selectedDates [as selectedDates] (ngx-animating-datepicker.js:408)
at updateProp (core.js:24768)
at checkAndUpdateDirectiveInline (core.js:24450)
at checkAndUpdateNodeInline (core.js:35151)
at checkAndUpdateNode (core.js:35090)
at debugCheckAndUpdateNode (core.js:36112)
at debugCheckDirectivesFn (core.js:36055)
at Object.eval [as updateDirectives]
If I remove [(selectedDates)]="dates", then the error is not appearing anymore, but the problem is that my dates are not saved anymore.
Do you think that this can be achieved? I would be very thankful for a solution.
Yes, dates is undefined. No value. Is it possible to replace the input with button? I need this button because I want to achieve an airbnb look for filters.
I will provide a fix for the error: Cannot read property '0' of null.
About the other stuff (replacing input for button?). That is unrelated to the current issue. Please create an new issue and describe more precise what you want to achieve
Hello,
I need to have this datepicker as in airbnb, to have a button, which opens a mat-menu with this datepicker inside of it. I tried to do this:
`
But I get this error after I choose dates, close the mat-menu and try to open the mat-menu again:
Cannot read property '0' of null at AnimatepickerComponent.getNextMonthArray (ngx-animating-datepicker.js:1081) at AnimatepickerComponent.goToDate (ngx-animating-datepicker.js:988) at AnimatepickerComponent.set selectedDates [as selectedDates] (ngx-animating-datepicker.js:408) at updateProp (core.js:24768) at checkAndUpdateDirectiveInline (core.js:24450) at checkAndUpdateNodeInline (core.js:35151) at checkAndUpdateNode (core.js:35090) at debugCheckAndUpdateNode (core.js:36112) at debugCheckDirectivesFn (core.js:36055) at Object.eval [as updateDirectives]
If I remove [(selectedDates)]="dates", then the error is not appearing anymore, but the problem is that my dates are not saved anymore.
Do you think that this can be achieved? I would be very thankful for a solution.
Hi idomiralin,
What happens with "dates" when the menu is closed? It looks like the dates is invalid.
Yes, dates is undefined. No value. Is it possible to replace the input with button? I need this button because I want to achieve an airbnb look for filters.
I will provide a fix for the error:
Cannot read property '0' of null
.About the other stuff (replacing input for button?). That is unrelated to the current issue. Please create an new issue and describe more precise what you want to achieve