{"action":"created","issue":{"url":"https://api.github.com/repos/Shopify/polaris-react/issues/1239","repository_url":"https://api.github.com/repos/Shopify/polaris-react","labels_url":"https://api.github.com/repos/Shopify/polaris-react/issues/1239/labels{/name}","comments_url":"https://api.github.com/repos/Shopify/polaris-react/issues/1239/comments","events_url":"https://api.github.com/repos/Shopify/polaris-react/issues/1239/events","html_url":"https://github.com/Shopify/polaris-react/issues/1239","id":423975201,"node_id":"MDU6SXNzdWU0MjM5NzUyMDE=","number":1239,"title":"DatePicker range with single date allows continued selection","user":{"login":"CameronGorrie","id":3865674,"node_id":"MDQ6VXNlcjM4NjU2NzQ=","avatar_url":"https://avatars2.githubusercontent.com/u/3865674?v=4","gravatar_id":"","url":"https://api.github.com/users/CameronGorrie","html_url":"https://github.com/CameronGorrie","followers_url":"https://api.github.com/users/CameronGorrie/followers","following_url":"https://api.github.com/users/CameronGorrie/following{/other_user}","gists_url":"https://api.github.com/users/CameronGorrie/gists{/gist_id}","starred_url":"https://api.github.com/users/CameronGorrie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CameronGorrie/subscriptions","organizations_url":"https://api.github.com/users/CameronGorrie/orgs","repos_url":"https://api.github.com/users/CameronGorrie/repos","events_url":"https://api.github.com/users/CameronGorrie/events{/privacy}","received_events_url":"https://api.github.com/users/CameronGorrie/received_events","type":"User","site_admin":false},"labels":[{"id":588288143,"node_id":"MDU6TGFiZWw1ODgyODgxNDM=","url":"https://api.github.com/repos/Shopify/polaris-react/labels/Bug","name":"Bug","color":"ee0701","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-03-21T22:49:46Z","updated_at":"2019-03-21T22:49:49Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"<!-- For feature requests, please use the following template: https://github.com/Shopify/polaris-react/issues/new?template=FEATURE_REQUEST.md -->\r\n\r\n# Issue summary\r\nIn a ranged `DatePicker` component selecting a single day by clicking it twice shouldn't continue to show the selection highlight.\r\n\r\n## Expected behavior\r\nSelecting a day twice should behave the same as selecting a range, or the same as `allowRange: false`\r\n\r\n## Actual behavior\r\n![datePickerClickIssue](https://user-images.githubusercontent.com/3865674/54789681-a9e0a800-4c09-11e9-8ec0-5273d6db919b.gif)\r\n\r\n## Steps to reproduce the problem\r\n1. Click the date you want to select once\r\n2. Click it twice\r\n3. Observe that the date selection hover still happens\r\n\r\n## Reduced test case\r\n```tsx\r\n// PlayGround.tsx\r\nimport * as React from 'react';\r\nimport {DatePicker} from '../src';\r\n\r\ninterface State {}\r\n\r\nexport default class Playground extends React.Component<{}, State> {\r\n  state = {\r\n    month: 1,\r\n    year: 2018,\r\n    selected: {\r\n      start: new Date('Wed Feb 07 2018 00:00:00 GMT-0500 (EST)'),\r\n      end: new Date('Wed Feb 07 2018 00:00:00 GMT-0500 (EST)'),\r\n    },\r\n  };\r\n\r\n  render() {\r\n    const {month, year, selected} = this.state;\r\n\r\n    return (\r\n      <DatePicker\r\n        month={month}\r\n        year={year}\r\n        onChange={this.handleChange}\r\n        onMonthChange={this.handleMonthChange}\r\n        selected={selected}\r\n        allowRange\r\n      />\r\n    );\r\n  }\r\n\r\n  handleChange = (value) => {\r\n    this.setState({selected: value});\r\n  };\r\n\r\n  handleMonthChange = (month, year) => {\r\n    this.setState({\r\n      month,\r\n      year,\r\n    });\r\n  };\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/Shopify/polaris-react/issues/comments/475432125","html_url":"https://github.com/Shopify/polaris-react/issues/1239#issuecomment-475432125","issue_url":"https://api.github.com/repos/Shopify/polaris-react/issues/1239","id":475432125,"node_id":"MDEyOklzc3VlQ29tbWVudDQ3NTQzMjEyNQ==","user":{"login":"probot-shopify[bot]","id":37905380,"node_id":"MDM6Qm90Mzc5MDUzODA=","avatar_url":"https://avatars2.githubusercontent.com/in/10530?v=4","gravatar_id":"","url":"https://api.github.com/users/probot-shopify%5Bbot%5D","html_url":"https://github.com/apps/probot-shopify","followers_url":"https://api.github.com/users/probot-shopify%5Bbot%5D/followers","following_url":"https://api.github.com/users/probot-shopify%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/probot-shopify%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/probot-shopify%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/probot-shopify%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/probot-shopify%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/probot-shopify%5Bbot%5D/repos","events_url":"https://api.github.com/users/probot-shopify%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/probot-shopify%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2019-03-21T22:49:49Z","updated_at":"2019-03-21T22:49:49Z","author_association":"NONE","body":"👋 Thanks for opening your first issue. A contributor should give feedback soon. If you haven’t already, please check out the [contributing guidelines](https://github.com/Shopify/polaris-react/blob/master/.github/CONTRIBUTING.md). You can also join [#polaris](https://shopifypartners.slack.com/messages/C8PTBMWNR) on the Shopify Partners Slack.\n"}}
{"actor":{"display_login":"probot-shopify"}}