{"action":"closed","issue":{"url":"https://api.github.com/repos/square/android-times-square/issues/291","repository_url":"https://api.github.com/repos/square/android-times-square","labels_url":"https://api.github.com/repos/square/android-times-square/issues/291/labels{/name}","comments_url":"https://api.github.com/repos/square/android-times-square/issues/291/comments","events_url":"https://api.github.com/repos/square/android-times-square/issues/291/events","html_url":"https://github.com/square/android-times-square/issues/291","id":163307277,"number":291,"title":"Multiple Range dates","user":{"login":"winniseptiani","id":6646273,"avatar_url":"https://avatars.githubusercontent.com/u/6646273?v=3","gravatar_id":"","url":"https://api.github.com/users/winniseptiani","html_url":"https://github.com/winniseptiani","followers_url":"https://api.github.com/users/winniseptiani/followers","following_url":"https://api.github.com/users/winniseptiani/following{/other_user}","gists_url":"https://api.github.com/users/winniseptiani/gists{/gist_id}","starred_url":"https://api.github.com/users/winniseptiani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/winniseptiani/subscriptions","organizations_url":"https://api.github.com/users/winniseptiani/orgs","repos_url":"https://api.github.com/users/winniseptiani/repos","events_url":"https://api.github.com/users/winniseptiani/events{/privacy}","received_events_url":"https://api.github.com/users/winniseptiani/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-01T02:31:27Z","updated_at":"2016-07-01T02:37:45Z","closed_at":"2016-07-01T02:37:45Z","body":"Hi,\r\nIs it possible to create multiple range dates? My purpose is to display multiple activity schedules from certain date to certain date in my calendar. I tried to modify the \"multi\" menu in sample code, like snippet below, but it produced an exception \"java.lang.IllegalArgumentException: RANGE mode only allows two selectedDates.  You tried to pass 6\".\r\n\r\n        multi.setOnClickListener(new OnClickListener() {\r\n            @Override\r\n            public void onClick(View v) {\r\n                setButtonsEnabled(multi);\r\n\r\n                calendar.setCustomDayView(new DefaultDayViewAdapter());\r\n                Calendar today = Calendar.getInstance();\r\n                ArrayList<Date> dates = new ArrayList<Date>();\r\n                for (int i = 0; i < 6; i++) {\r\n                    today.add(Calendar.DAY_OF_MONTH, 3);\r\n                    dates.add(today.getTime());\r\n                }\r\n                calendar.setDecorators(Collections.<CalendarCellDecorator>emptyList());\r\n                calendar.init(new Date(), nextYear.getTime()) //\r\n                    .inMode(SelectionMode.MULTIPLE) //\r\n                    .inMode(SelectionMode.RANGE)\r\n                    .withSelectedDates(dates);\r\n            }\r\n        });\r\n\r\nI apologise if my English is bad. Thank for your help."}}
{"actor":{"display_login":"edenman"}}