{"action":"created","issue":{"url":"https://api.github.com/repos/joshsalverda/datepickr/issues/7","labels_url":"https://api.github.com/repos/joshsalverda/datepickr/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/joshsalverda/datepickr/issues/7/comments","events_url":"https://api.github.com/repos/joshsalverda/datepickr/issues/7/events","html_url":"https://github.com/joshsalverda/datepickr/issues/7","id":57332515,"number":7,"title":"Parsed date is incorrect if date format is different from default 'F j, Y'","user":{"login":"cla78","id":10961214,"avatar_url":"https://avatars.githubusercontent.com/u/10961214?v=3","gravatar_id":"","url":"https://api.github.com/users/cla78","html_url":"https://github.com/cla78","followers_url":"https://api.github.com/users/cla78/followers","following_url":"https://api.github.com/users/cla78/following{/other_user}","gists_url":"https://api.github.com/users/cla78/gists{/gist_id}","starred_url":"https://api.github.com/users/cla78/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cla78/subscriptions","organizations_url":"https://api.github.com/users/cla78/orgs","repos_url":"https://api.github.com/users/cla78/repos","events_url":"https://api.github.com/users/cla78/events{/privacy}","received_events_url":"https://api.github.com/users/cla78/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-11T15:42:36Z","updated_at":"2015-07-22T08:54:50Z","closed_at":null,"body":"Hi, \r\nI've tried doing two different tests after changing the input control value property to \"28/02/2015\"(value=\"28/02/2015\").\r\n-I changed the dateformat in js to'd/m/Y '\r\n-I explicitly call the dateformat ' {dateFormat: 'd/m/Y '} ' as an option in html\r\n\r\nThe control returns the date 02/04/2017.\r\n\r\n![image](https://cloud.githubusercontent.com/assets/10961214/6149976/cb7ad9e0-b20c-11e4-8d93-f7fc0538e93e.png)\r\n\r\n![image](https://cloud.githubusercontent.com/assets/10961214/6149989/d563e8d4-b20c-11e4-8d0c-b14ddcd73370.png)\r\n\r\n![image](https://cloud.githubusercontent.com/assets/10961214/6149999/e4e5f5f4-b20c-11e4-899d-41eeeb30ca26.png)\r\n\r\nI'm trying to figure out what doesn't work.\r\n"},"comment":{"url":"https://api.github.com/repos/joshsalverda/datepickr/issues/comments/123625864","html_url":"https://github.com/joshsalverda/datepickr/issues/7#issuecomment-123625864","issue_url":"https://api.github.com/repos/joshsalverda/datepickr/issues/7","id":123625864,"user":{"login":"nikkilocke","id":684025,"avatar_url":"https://avatars.githubusercontent.com/u/684025?v=3","gravatar_id":"","url":"https://api.github.com/users/nikkilocke","html_url":"https://github.com/nikkilocke","followers_url":"https://api.github.com/users/nikkilocke/followers","following_url":"https://api.github.com/users/nikkilocke/following{/other_user}","gists_url":"https://api.github.com/users/nikkilocke/gists{/gist_id}","starred_url":"https://api.github.com/users/nikkilocke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikkilocke/subscriptions","organizations_url":"https://api.github.com/users/nikkilocke/orgs","repos_url":"https://api.github.com/users/nikkilocke/repos","events_url":"https://api.github.com/users/nikkilocke/events{/privacy}","received_events_url":"https://api.github.com/users/nikkilocke/received_events","type":"User","site_admin":false},"created_at":"2015-07-22T08:54:50Z","updated_at":"2015-07-22T08:54:50Z","body":"A simpler work round for this problem is to supply the date value in ISO format (Y-m-d), and to add 2 lines of code to reformat the date during init:\r\n\r\n            self.currentMonthView = date.current.month.integer();\r\n            self.currentDayView = date.current.day();\r\n        }\r\n    +    var currentTimestamp = new Date(self.currentYearView, self.currentMonthView, self.selectedDate.day).getTime();\r\n    +    self.element.value = formatDate(self.config.dateFormat, currentTimestamp);\r\n\r\n        wrap();\r\n        buildCalendar();\r\n"}}