{"action":"created","issue":{"url":"https://api.github.com/repos/jquense/react-widgets/issues/58","labels_url":"https://api.github.com/repos/jquense/react-widgets/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/jquense/react-widgets/issues/58/comments","events_url":"https://api.github.com/repos/jquense/react-widgets/issues/58/events","html_url":"https://github.com/jquense/react-widgets/pull/58","id":59886193,"number":58,"title":"Add support for date range values to `Calendar`","user":{"login":"dwick","id":823747,"avatar_url":"https://avatars.githubusercontent.com/u/823747?v=3","gravatar_id":"","url":"https://api.github.com/users/dwick","html_url":"https://github.com/dwick","followers_url":"https://api.github.com/users/dwick/followers","following_url":"https://api.github.com/users/dwick/following{/other_user}","gists_url":"https://api.github.com/users/dwick/gists{/gist_id}","starred_url":"https://api.github.com/users/dwick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwick/subscriptions","organizations_url":"https://api.github.com/users/dwick/orgs","repos_url":"https://api.github.com/users/dwick/repos","events_url":"https://api.github.com/users/dwick/events{/privacy}","received_events_url":"https://api.github.com/users/dwick/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-03-05T00:32:40Z","updated_at":"2015-03-05T06:16:00Z","closed_at":"2015-03-05T05:27:37Z","pull_request":{"url":"https://api.github.com/repos/jquense/react-widgets/pulls/58","html_url":"https://github.com/jquense/react-widgets/pull/58","diff_url":"https://github.com/jquense/react-widgets/pull/58.diff","patch_url":"https://github.com/jquense/react-widgets/pull/58.patch"},"body":"This PR adds support for date range values to the calendar widget.\r\n\r\nExample:\r\n\r\n```js\r\nvar start = new Date(2015, 0, 1)\r\n   ,  end = new Date(2015, 0, 10);\r\n\r\n<Calendar value={[start, end]} />\r\n```\r\n\r\nIn the above example, `start` and/or `end` can be `null` as well.  If both values are `null`, then nothing is selected, and if a single value is `null` then only a single date is selected.\r\n\r\nLet me know if you need anything else from me to get this in."},"comment":{"url":"https://api.github.com/repos/jquense/react-widgets/issues/comments/77312798","html_url":"https://github.com/jquense/react-widgets/pull/58#issuecomment-77312798","issue_url":"https://api.github.com/repos/jquense/react-widgets/issues/58","id":77312798,"user":{"login":"jquense","id":339286,"avatar_url":"https://avatars.githubusercontent.com/u/339286?v=3","gravatar_id":"","url":"https://api.github.com/users/jquense","html_url":"https://github.com/jquense","followers_url":"https://api.github.com/users/jquense/followers","following_url":"https://api.github.com/users/jquense/following{/other_user}","gists_url":"https://api.github.com/users/jquense/gists{/gist_id}","starred_url":"https://api.github.com/users/jquense/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jquense/subscriptions","organizations_url":"https://api.github.com/users/jquense/orgs","repos_url":"https://api.github.com/users/jquense/repos","events_url":"https://api.github.com/users/jquense/events{/privacy}","received_events_url":"https://api.github.com/users/jquense/received_events","type":"User","site_admin":false},"created_at":"2015-03-05T06:16:00Z","updated_at":"2015-03-05T06:16:00Z","body":"hey @dwick this is cool. I think ultimately you've got a good idea here, selecting ranges of dates would be a nice feature for the Calendar. The big challenge here is getting the interaction model right. Here are some thoughts on that, if you'd like to take it on, if not we can file this away and it'll be a great starting point down the road if I get some time. Either way I appreciate you taking the time to write this up.\r\n\r\n- the click to select model doesn't work great here (your hairy onChange). I think (like you noted) you'd need to do proper drag to select. That poses some additional issues, like needing to shift months as you dragged past the start or end of the month (think Jan 16 to Feb 5th).\r\n- You'd also need to implement the same functionality in a keyboard only model (like ctrl + arrow key) to accommodate users that don't use a mouse.\r\n"}}