Previous and Next month changing issue
Closed this issue · 7 comments
There has issue to change the previous/next month. When I try to change the month I got the following issues:
range-datepicker-calendar.js:199 Uncaught TypeError: Cannot read property 'classList' of null
at HTMLElement._handlePrevMonth (range-datepicker-calendar.js:199)
at HTMLElement.handler (template-stamp.html:92)
at Object._fire (gestures.html:565)
at Object.forward (gestures.html:927)
at Object.touchend (gestures.html:912)
at HTMLElement._handleNative (gestures.html:355)
Thanks, @RoXuS.
If I use the Narrow month (ie, single month) I can't enable next or previous month selection. Although I can enable only next month change it throws an exception.
Uncaught TypeError: Cannot read property '_handleNextMonth' of null
at HTMLElement._handleNextMonth (range-datepicker-behavior.js:28)
at HTMLElement.handler (template-stamp.html:92)
at HTMLElement._handleNextMonth (range-datepicker-calendar.js:174)
at HTMLElement.handler (template-stamp.html:92)
at Object._fire (gestures.html:565)
at Object.forward (gestures.html:927)
at Object.touchend (gestures.html:912)
at HTMLElement._handleNative (gestures.html:355)
My element is look like:
<dom-if if="[[_isNarrow(forceNarrow, narrow)]]"> <template> <div class="horizontal-section-container centered"> <range-datepicker-calendar disabled-days="[[disabledDays]]" min="[[min]]" max="[[max]]" on-new-year-is-manually-selected="_handleNewYearSelected" enable-year-change="[[enableYearChange]]" next no-range="[[noRange]]" on-prev-month="_handlePrevMonth" on-next-month="_handleNextMonth" hovered-date="{{_hoveredDate}}" date-to="{{dateTo}}" date-from="{{dateFrom}}" locale="[[locale]]" id="firstDatePicker" month="[[_monthPlus]]" class-name="firstDatePicker" cal-pos="[[calPos]]" year="[[_yearPlus]]"> </range-datepicker-calendar> </div> </template> </dom-if>
How can I enable both next and previous month changing events for single month calendar?