-
Notifications
You must be signed in to change notification settings - Fork 512
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
Issue while using dayBinder with MonthscrollListener #179
Comments
The above mentioned issue is resolved now with following solution:
This solution i applied and it is setting the data to calendarview and giving desired output. But, i come across one issue when calling notifymonthchanged and if month dates overflows to 6th row then 6 th row dates are not getting visible, white space is showing instead. Also if i don't call notifymonthchanged in monthscrolllistener then this cropping of dates in 6 th row issue will not occur but in that case daybinder is not getting called again to set the data to daybinder after getting currentMonthdata in arraylist inside monthscrolllistener. Please suggest me any solution. also please tell me what i am doing is correct approach or not, calling notifymonthchanged inside monthscrolllistener after getting currentmonth data. |
I don't fully understand this issue but, I don't think you should be calling |
By the way, I must say your calendar implementation looks quite good. |
thank you so much for your library. All credit goes to you |
this is my code after getting currentmonthdata in monthscroll listener i am calling notifymonthchanged. |
I resolved above mentioned issue by calling calendarView.notifyCalendarChanged(); instead of notifymonthchanged. Now i m stuck with the implementation of below scenario: |
I think there's a misunderstanding of how the library works. If you need to change any date or month, you need to tell the calendar to reload that date or month and then make the changes in the daybinder or month header/footer binder as needed. |
After you get the response from the server, store the response in a field and then notify the calendar to reload the date. Your daybinder will be called and you then use the new information you stored in the field to adjust the date cell accordigly. |
thank you @kizitonwose for your solution. I resolved the issue. Logs: |
I don't see CalendarView in the logs. This is definitely from somewhere else. Also, maybe close this issue and open a new one. |
how to lazy load event from server |
Hi Kizitonwose,
We are getting calendar data from remote api for 3 years, current previous and next.
how to use daybinder for each month of the year according to data i received from the API.
How to put condition on dates to change the background of the day of particular month accordingly in daybinder.
{
"2019": [
],
"2020": [
],
"2021": [
{
"sd": 1577212200000,
"ed": 0,
"desc": "Christmas-Mumbai-India-2019",
"typ": "H",
"status": 0,
"timeDate": null
},
{
"sd": 1586716200000,
"ed": 1586716200000,
"desc": "Vaisahkhi",
"typ": "F",
"status": 0,
"sdd": 0,
"edd": 0,
"levtype": 0,
"datetobechecked": 0,
"timeDate": "2020-04-13",
"shortName": null
},
{
"sd": 1602268200000,
"ed": 1602268200000,
"desc": "Lev_124423268",
"typ": "L",
"status": 3,
"sdd": 3,
"edd": 3,
"levtype": 0,
"datetobechecked": 0,
"timeDate": "2020-10-10",
"shortName": null
},
{
"sd": 1578076200000,
"ed": 0,
"desc": "Project Weekend-Saturday ",
"typ": "W",
"status": 0,
"timeDate": null
},
{
"sd": 1578162600000,
"ed": 0,
"desc": "Project Weekend-Sunday ",
"typ": "W",
"status": 0,
"timeDate": null
}
]
}
Above is the response structure. Like this data for every year will come. typ - W - weekend, F - Flexi, H- Holiday, L - Leave
for all this flag i want to change the background of the day according to response. but somehow i am failing to do this. how to achieve this.
Currrently on monthscrollListener i am getting the list of model object for month. but how to bind that data to daybinder on monthscrollListener.
The text was updated successfully, but these errors were encountered: