{"action":"created","issue":{"url":"https://api.github.com/repos/Hacker0x01/react-datepicker/issues/1018","repository_url":"https://api.github.com/repos/Hacker0x01/react-datepicker","labels_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/issues/1018/labels{/name}","comments_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/issues/1018/comments","events_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/issues/1018/events","html_url":"https://github.com/Hacker0x01/react-datepicker/issues/1018","id":256424834,"number":1018,"title":"Date Selected is One Day Off","user":{"login":"YOO629","id":11303047,"avatar_url":"https://avatars1.githubusercontent.com/u/11303047?v=4","gravatar_id":"","url":"https://api.github.com/users/YOO629","html_url":"https://github.com/YOO629","followers_url":"https://api.github.com/users/YOO629/followers","following_url":"https://api.github.com/users/YOO629/following{/other_user}","gists_url":"https://api.github.com/users/YOO629/gists{/gist_id}","starred_url":"https://api.github.com/users/YOO629/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YOO629/subscriptions","organizations_url":"https://api.github.com/users/YOO629/orgs","repos_url":"https://api.github.com/users/YOO629/repos","events_url":"https://api.github.com/users/YOO629/events{/privacy}","received_events_url":"https://api.github.com/users/YOO629/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2017-09-09T08:39:03Z","updated_at":"2017-12-14T09:42:41Z","closed_at":null,"author_association":"NONE","body":"Hi, I'm having an interesting issue with my usage of the datepicker component.\r\n\r\nMy code is pretty basic, it looks like this:\r\n\r\n```\r\n<ReactDatePicker\r\n  onChange={(val) => this.handleChange(val)}\r\n  selected={this.state.currentDate}\r\n/>\r\n```\r\n\r\nand my handler fn\r\n\r\n```\r\n  handleChange(momentDate) {\r\n    console.log(momentDate.toISOString())\r\n    this.setState({currentDate: momentDate});\r\n  }\r\n```\r\n\r\nThe issue that I see is that when I select a date from the dropdown, the visual aspects of the component appear to be working fine -- I select 09/10 (sept 10th) and that's what I see in the input field.\r\n\r\nHowever, in my `console.log()` in my handler function, I see that when I select 09/10, the output is `2017-09-09T21:00:00.000Z`. `momentDate.toISOString()` is ultimately what I'm sending to the DB to be saved, so it's problematic that it's one day off.\r\n\r\nI'm not sure what to make of this. I was expecting to see `2017-09-10T21:00:00.000Z`. It looks like \r\n `momentDate` is localized, so if I'm in a UTC + 3 timezone and choose 09/10 00:00:00, I'm actually choosing 09/09 21:00:00 (my hypothesis). Even if I set the `utcOffset` prop to 0 it looks like the localization is still happening.\r\n\r\nAm I doing something wrong? Is there a way for me to just kind of...turn off the localization? I'm using the component purely to just pick a day in the calendar. I don't care what timezone they're in, if they pick 09/10, they pick 09/10.\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/Hacker0x01/react-datepicker/issues/comments/351659408","html_url":"https://github.com/Hacker0x01/react-datepicker/issues/1018#issuecomment-351659408","issue_url":"https://api.github.com/repos/Hacker0x01/react-datepicker/issues/1018","id":351659408,"user":{"login":"swellmar","id":16102176,"avatar_url":"https://avatars3.githubusercontent.com/u/16102176?v=4","gravatar_id":"","url":"https://api.github.com/users/swellmar","html_url":"https://github.com/swellmar","followers_url":"https://api.github.com/users/swellmar/followers","following_url":"https://api.github.com/users/swellmar/following{/other_user}","gists_url":"https://api.github.com/users/swellmar/gists{/gist_id}","starred_url":"https://api.github.com/users/swellmar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swellmar/subscriptions","organizations_url":"https://api.github.com/users/swellmar/orgs","repos_url":"https://api.github.com/users/swellmar/repos","events_url":"https://api.github.com/users/swellmar/events{/privacy}","received_events_url":"https://api.github.com/users/swellmar/received_events","type":"User","site_admin":false},"created_at":"2017-12-14T09:42:41Z","updated_at":"2017-12-14T09:42:41Z","author_association":"NONE","body":"@mwickett @RobMaple Where do you find this utcOffset prob? I can find it on 100 different places "}}
{"actor":{"display_login":"swellmar"}}