{"action":"opened","issue":{"url":"https://api.github.com/repos/chmln/flatpickr/issues/633","repository_url":"https://api.github.com/repos/chmln/flatpickr","labels_url":"https://api.github.com/repos/chmln/flatpickr/issues/633/labels{/name}","comments_url":"https://api.github.com/repos/chmln/flatpickr/issues/633/comments","events_url":"https://api.github.com/repos/chmln/flatpickr/issues/633/events","html_url":"https://github.com/chmln/flatpickr/issues/633","id":209238331,"number":633,"title":"minDate and maxDate in config don't work with custom parseDate/formatDate/dateFormat","user":{"login":"iamthechad","id":621539,"avatar_url":"https://avatars.githubusercontent.com/u/621539?v=3","gravatar_id":"","url":"https://api.github.com/users/iamthechad","html_url":"https://github.com/iamthechad","followers_url":"https://api.github.com/users/iamthechad/followers","following_url":"https://api.github.com/users/iamthechad/following{/other_user}","gists_url":"https://api.github.com/users/iamthechad/gists{/gist_id}","starred_url":"https://api.github.com/users/iamthechad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamthechad/subscriptions","organizations_url":"https://api.github.com/users/iamthechad/orgs","repos_url":"https://api.github.com/users/iamthechad/repos","events_url":"https://api.github.com/users/iamthechad/events{/privacy}","received_events_url":"https://api.github.com/users/iamthechad/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-02-21T18:52:42Z","updated_at":"2017-02-21T18:52:42Z","closed_at":null,"body":"## Expected Behavior\r\nI expect to be able to set a custom `dateFormat` and a `minDate` or `maxDate` in the config and have the control update correctly.\r\n\r\n## Current Behavior\r\nWe're using MomentJS, so we've overridden `parseDate` and `formatDate` to be able to reuse existing date format strings that are used elsewhere in the app. When only setting `defaultDate`, this works as expected. When setting `minDate` or `maxDate` in the config, however, the min/max value is not properly evaluated nor is the `defaultDate` value.\r\n\r\n## Possible Solution\r\nBased on looking at `parseConfig()`, it looks like the min/max values are evaluated before any custom date format is applied. In fact, if I supply `minDate` in the default `\"Y-m-d\"` format the control then behaves as expected.\r\n\r\n## Steps to Reproduce (for bugs)\r\nCodePen: https://codepen.io/iamthechad/pen/rjXrXR?editors=1010"}}
{"actor":{"display_login":"iamthechad"}}