{"action":"created","issue":{"url":"https://api.github.com/repos/square/android-times-square/issues/273","repository_url":"https://api.github.com/repos/square/android-times-square","labels_url":"https://api.github.com/repos/square/android-times-square/issues/273/labels{/name}","comments_url":"https://api.github.com/repos/square/android-times-square/issues/273/comments","events_url":"https://api.github.com/repos/square/android-times-square/issues/273/events","html_url":"https://github.com/square/android-times-square/issues/273","id":146617170,"number":273,"title":"cell.setHighlighted(boolean) and CalanderPickerView.highlightDates(Collection<Date>) are not working","user":{"login":"rosamerinoclaros","id":4593084,"avatar_url":"https://avatars.githubusercontent.com/u/4593084?v=3","gravatar_id":"","url":"https://api.github.com/users/rosamerinoclaros","html_url":"https://github.com/rosamerinoclaros","followers_url":"https://api.github.com/users/rosamerinoclaros/followers","following_url":"https://api.github.com/users/rosamerinoclaros/following{/other_user}","gists_url":"https://api.github.com/users/rosamerinoclaros/gists{/gist_id}","starred_url":"https://api.github.com/users/rosamerinoclaros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rosamerinoclaros/subscriptions","organizations_url":"https://api.github.com/users/rosamerinoclaros/orgs","repos_url":"https://api.github.com/users/rosamerinoclaros/repos","events_url":"https://api.github.com/users/rosamerinoclaros/events{/privacy}","received_events_url":"https://api.github.com/users/rosamerinoclaros/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-04-07T13:05:52Z","updated_at":"2016-04-07T16:01:04Z","closed_at":"2016-04-07T15:29:29Z","body":"I am using the CalendarPickerView in SelectionMode range. If the selected range contains weekends cells, these won't get hightlighted. I need to highlight the whole selected range, weekends included. \r\nI tried both ways:\r\n1. In my overwritten CalendarCellDecorator class, decorate(CalendarCellView cell, Date date) using cell.setHighlighted(true)\r\n2. After I have both startDate and endDate, iterate all days, find the weekends and call CalanderPickerView.highlightDates(Collection<Date>)\r\n\r\nBut none of this worked out. I tried to hightlight programmatically any cell: no success."},"comment":{"url":"https://api.github.com/repos/square/android-times-square/issues/comments/206970007","html_url":"https://github.com/square/android-times-square/issues/273#issuecomment-206970007","issue_url":"https://api.github.com/repos/square/android-times-square/issues/273","id":206970007,"user":{"login":"rosamerinoclaros","id":4593084,"avatar_url":"https://avatars.githubusercontent.com/u/4593084?v=3","gravatar_id":"","url":"https://api.github.com/users/rosamerinoclaros","html_url":"https://github.com/rosamerinoclaros","followers_url":"https://api.github.com/users/rosamerinoclaros/followers","following_url":"https://api.github.com/users/rosamerinoclaros/following{/other_user}","gists_url":"https://api.github.com/users/rosamerinoclaros/gists{/gist_id}","starred_url":"https://api.github.com/users/rosamerinoclaros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rosamerinoclaros/subscriptions","organizations_url":"https://api.github.com/users/rosamerinoclaros/orgs","repos_url":"https://api.github.com/users/rosamerinoclaros/repos","events_url":"https://api.github.com/users/rosamerinoclaros/events{/privacy}","received_events_url":"https://api.github.com/users/rosamerinoclaros/received_events","type":"User","site_admin":false},"created_at":"2016-04-07T16:01:04Z","updated_at":"2016-04-07T16:01:04Z","body":"Yes, of course.\r\n\r\n```\r\npublic class SelectableDecorator implements CalendarCellDecorator {\r\n\r\n        @Override\r\n        public void decorate(CalendarCellView cell, Date date) {\r\n            if(isDefaultCalendar){\r\n                if(isWeekend(date)){\r\n                    cell.setSelectable(false);\r\n                }\r\n            } else {\r\n                if (mRentalStartDate != null && mRentalEndDate != null) {\r\n                    if(date.after(mRentalStartDate)&&date.before(mRentalEndDate)){\r\n                        //TODO: fix weekend cells not highlighted on selection range\r\n                    }\r\n                } else {\r\n                    if(isSelectable(date)){\r\n                        cell.setSelectable(true);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    }\r\n```"}}