{"action":"created","issue":{"url":"https://api.github.com/repos/Eonasdan/bootstrap-datetimepicker/issues/791","labels_url":"https://api.github.com/repos/Eonasdan/bootstrap-datetimepicker/issues/791/labels{/name}","comments_url":"https://api.github.com/repos/Eonasdan/bootstrap-datetimepicker/issues/791/comments","events_url":"https://api.github.com/repos/Eonasdan/bootstrap-datetimepicker/issues/791/events","html_url":"https://github.com/Eonasdan/bootstrap-datetimepicker/issues/791","id":55799757,"number":791,"title":"Don't revert the date when input is invalid","user":{"login":"am0d","id":139484,"avatar_url":"https://avatars.githubusercontent.com/u/139484?v=3","gravatar_id":"","url":"https://api.github.com/users/am0d","html_url":"https://github.com/am0d","followers_url":"https://api.github.com/users/am0d/followers","following_url":"https://api.github.com/users/am0d/following{/other_user}","gists_url":"https://api.github.com/users/am0d/gists{/gist_id}","starred_url":"https://api.github.com/users/am0d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/am0d/subscriptions","organizations_url":"https://api.github.com/users/am0d/orgs","repos_url":"https://api.github.com/users/am0d/repos","events_url":"https://api.github.com/users/am0d/events{/privacy}","received_events_url":"https://api.github.com/users/am0d/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/Eonasdan/bootstrap-datetimepicker/milestones/9","labels_url":"https://api.github.com/repos/Eonasdan/bootstrap-datetimepicker/milestones/9/labels","id":942020,"number":9,"title":"4.6.11","description":"","creator":{"login":"Eonasdan","id":1006516,"avatar_url":"https://avatars.githubusercontent.com/u/1006516?v=3","gravatar_id":"","url":"https://api.github.com/users/Eonasdan","html_url":"https://github.com/Eonasdan","followers_url":"https://api.github.com/users/Eonasdan/followers","following_url":"https://api.github.com/users/Eonasdan/following{/other_user}","gists_url":"https://api.github.com/users/Eonasdan/gists{/gist_id}","starred_url":"https://api.github.com/users/Eonasdan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eonasdan/subscriptions","organizations_url":"https://api.github.com/users/Eonasdan/orgs","repos_url":"https://api.github.com/users/Eonasdan/repos","events_url":"https://api.github.com/users/Eonasdan/events{/privacy}","received_events_url":"https://api.github.com/users/Eonasdan/received_events","type":"User","site_admin":false},"open_issues":20,"closed_issues":1,"state":"open","created_at":"2015-01-19T15:23:32Z","updated_at":"2015-02-21T17:23:57Z","due_on":null,"closed_at":null},"comments":9,"created_at":"2015-01-28T19:02:18Z","updated_at":"2015-02-21T17:25:36Z","closed_at":null,"body":"See http://jsfiddle.net/cmpgtuwy/5/\r\n\r\nI've come across an issue with the current behaviour regarding invalid input.  Currently, if the value entered is an invalid date, as soon as focus is lost the datepicker will revert the value to the previously valid date.\r\n\r\nThis is problem in the situation I am using it in (which can be replicated at the above link).\r\n\r\nIf the user was to type \"Feb 29, 2015\" into the input box (as an example of an invalid date), and then click the \"Get Current Date\" button, I would expect that I would get an invalid date object as the current value of the datepicker.  However, I simply get the previous valid value.\r\n\r\nThis is problematic when the button is actually a \"Save and Close\" button, because the user may not even see that the value reverted.  Since the `.date()` call returns a valid date, my validation routines don't fail and therefore the save would go ahead, but with a different value than the user is expecting.\r\n\r\nCan we please have a way to force the invalid value to stay in there, and for the `.date()` call to return the invalid date?  That way I can call `.isValid()` on the `moment` object that gets returned, to see what the error is."},"comment":{"url":"https://api.github.com/repos/Eonasdan/bootstrap-datetimepicker/issues/comments/75381894","html_url":"https://github.com/Eonasdan/bootstrap-datetimepicker/issues/791#issuecomment-75381894","issue_url":"https://api.github.com/repos/Eonasdan/bootstrap-datetimepicker/issues/791","id":75381894,"user":{"login":"Eonasdan","id":1006516,"avatar_url":"https://avatars.githubusercontent.com/u/1006516?v=3","gravatar_id":"","url":"https://api.github.com/users/Eonasdan","html_url":"https://github.com/Eonasdan","followers_url":"https://api.github.com/users/Eonasdan/followers","following_url":"https://api.github.com/users/Eonasdan/following{/other_user}","gists_url":"https://api.github.com/users/Eonasdan/gists{/gist_id}","starred_url":"https://api.github.com/users/Eonasdan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eonasdan/subscriptions","organizations_url":"https://api.github.com/users/Eonasdan/orgs","repos_url":"https://api.github.com/users/Eonasdan/repos","events_url":"https://api.github.com/users/Eonasdan/events{/privacy}","received_events_url":"https://api.github.com/users/Eonasdan/received_events","type":"User","site_admin":false},"created_at":"2015-02-21T17:25:36Z","updated_at":"2015-02-21T17:25:36Z","body":"`keepInvalid` has been added to the dev branch. setting this to true will not force the date to the previous date.\r\n\r\nYou can, in case you didn't realize, listen for `dp.error` and change the picker or throw your own error messages"}}