{"action":"created","issue":{"url":"https://api.github.com/repos/chmln/flatpickr/issues/325","repository_url":"https://api.github.com/repos/chmln/flatpickr","labels_url":"https://api.github.com/repos/chmln/flatpickr/issues/325/labels{/name}","comments_url":"https://api.github.com/repos/chmln/flatpickr/issues/325/comments","events_url":"https://api.github.com/repos/chmln/flatpickr/issues/325/events","html_url":"https://github.com/chmln/flatpickr/issues/325","id":181330447,"number":325,"title":"Usability suggestions - modification to date range selection.","user":{"login":"davidklebanoff","id":7867074,"avatar_url":"https://avatars.githubusercontent.com/u/7867074?v=3","gravatar_id":"","url":"https://api.github.com/users/davidklebanoff","html_url":"https://github.com/davidklebanoff","followers_url":"https://api.github.com/users/davidklebanoff/followers","following_url":"https://api.github.com/users/davidklebanoff/following{/other_user}","gists_url":"https://api.github.com/users/davidklebanoff/gists{/gist_id}","starred_url":"https://api.github.com/users/davidklebanoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidklebanoff/subscriptions","organizations_url":"https://api.github.com/users/davidklebanoff/orgs","repos_url":"https://api.github.com/users/davidklebanoff/repos","events_url":"https://api.github.com/users/davidklebanoff/events{/privacy}","received_events_url":"https://api.github.com/users/davidklebanoff/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-06T05:54:56Z","updated_at":"2016-10-06T06:09:01Z","closed_at":null,"body":"Currently, when in \"Range\" mode, if a user has already selected two dates to create a range, and then proceeds to select another date the date range changes moving the closest endpoint of the range to the newly selected date. I don't know how others feel, but to me the way this operated was a bit unexpected and I found it a little frustrating to use.  I think a large part of the confusion may lie in the fact that it's not immediately obvious which endpoint is going to move if you select a date near the middle of an existing range. But even beyond that, something just felt off. I would like to propose a different way to handle date ranges.\r\n\r\nAssuming we start with an empty calendar (in Range mode):\r\n\r\n- A user clicks a date that date is selected as the start-date of a range.\r\n - If a user then clicks the same date again, that date is selected as the end-date, thus the \"range\" is really just a single day.\r\n - If a user then clicks a date earlier than the start-date, that date becomes the new start-date of a range.\r\n - If a user then clicks a date after the start-date, that date becomes the end-date of a range.\r\n   - If a user then clicks **ANY** date, the end-date is cleared and the clicked date becomes the new start-date.\r\n\r\n**The explained behavior above is utilized here:**\r\nhttp://www.daterangepicker.com/#ex1"},"comment":{"url":"https://api.github.com/repos/chmln/flatpickr/issues/comments/251875270","html_url":"https://github.com/chmln/flatpickr/issues/325#issuecomment-251875270","issue_url":"https://api.github.com/repos/chmln/flatpickr/issues/325","id":251875270,"user":{"login":"davidklebanoff","id":7867074,"avatar_url":"https://avatars.githubusercontent.com/u/7867074?v=3","gravatar_id":"","url":"https://api.github.com/users/davidklebanoff","html_url":"https://github.com/davidklebanoff","followers_url":"https://api.github.com/users/davidklebanoff/followers","following_url":"https://api.github.com/users/davidklebanoff/following{/other_user}","gists_url":"https://api.github.com/users/davidklebanoff/gists{/gist_id}","starred_url":"https://api.github.com/users/davidklebanoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidklebanoff/subscriptions","organizations_url":"https://api.github.com/users/davidklebanoff/orgs","repos_url":"https://api.github.com/users/davidklebanoff/repos","events_url":"https://api.github.com/users/davidklebanoff/events{/privacy}","received_events_url":"https://api.github.com/users/davidklebanoff/received_events","type":"User","site_admin":false},"created_at":"2016-10-06T06:09:01Z","updated_at":"2016-10-06T06:09:01Z","body":"By the way, I have seen calendars implemented somewhat similar to the existing calendar setup that is currently offered, but with a twist (two inputs) that I think works for their situations but not for this component (one input).\r\n\r\nAirline websites often have two calendar inputs - one for departure date and one for returning. If one has a range already selected then may click on the 'departure' input and click on a new calendar date that will only move the departure date (unless they selected a date after the return date, in which case the return date is cleared), if they click on the 'returning' input and click on a new calendar date that will only move the returning date (unless they selected a date before the departure date, in which case the departure date is cleared).\r\n\r\nExamples:\r\nhttps://www.kayak.com/\r\nhttps://www.orbitz.com/\r\nhttp://www.delta.com/"}}
{"actor":{"display_login":"davidklebanoff"}}