Material-calendarview: Date is off by one month

Created on 29 Oct 2016  路  2Comments  路  Source: prolificinteractive/material-calendarview

I discovered that the dates are all off by one month whenever I select a particular date on the CalendarView. For example, whenever I select a particular date using the following:

CalendarDay date = widget.getSelectedDate();

The date selected was 2016-10-30, but the date that was printed out was CalendarDay{2016-9-30}.

Also, when I added a decorator for a particular date, it appeared in the following month instead.

bug

Most helpful comment

That is because the index of Months in array started from 0.

All 2 comments

That is because the index of Months in array started from 0.

To trace the code, you could look at [CalendarDay toString()]

Also, check [Calendar.JANUARY] for more details :D

Was this page helpful?
0 / 5 - 0 ratings

Related issues

broakenmedia picture broakenmedia  路  5Comments

gibsonndemanga picture gibsonndemanga  路  6Comments

SamBob01 picture SamBob01  路  3Comments

notnotme picture notnotme  路  5Comments

erylljoy24 picture erylljoy24  路  3Comments