{"action":"closed","issue":{"url":"https://api.github.com/repos/uikit/uikit/issues/1403","labels_url":"https://api.github.com/repos/uikit/uikit/issues/1403/labels{/name}","comments_url":"https://api.github.com/repos/uikit/uikit/issues/1403/comments","events_url":"https://api.github.com/repos/uikit/uikit/issues/1403/events","html_url":"https://github.com/uikit/uikit/issues/1403","id":96764809,"number":1403,"title":"Multiple datepickers for check-in / check-out form","user":{"login":"wdebusschere","id":4136426,"avatar_url":"https://avatars.githubusercontent.com/u/4136426?v=3","gravatar_id":"","url":"https://api.github.com/users/wdebusschere","html_url":"https://github.com/wdebusschere","followers_url":"https://api.github.com/users/wdebusschere/followers","following_url":"https://api.github.com/users/wdebusschere/following{/other_user}","gists_url":"https://api.github.com/users/wdebusschere/gists{/gist_id}","starred_url":"https://api.github.com/users/wdebusschere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wdebusschere/subscriptions","organizations_url":"https://api.github.com/users/wdebusschere/orgs","repos_url":"https://api.github.com/users/wdebusschere/repos","events_url":"https://api.github.com/users/wdebusschere/events{/privacy}","received_events_url":"https://api.github.com/users/wdebusschere/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-23T08:53:32Z","updated_at":"2015-07-23T12:20:03Z","closed_at":"2015-07-23T12:20:03Z","body":"We have a hotel booking form and want to limit the selectable daterange by adding a dynamic minDate and maxDate. We do this on the input field change event. It works perfect for the first run of the change event, but after the first time, minDate and MaxDate do not get updated anymore, nothing happens, change event function is executed\r\n\r\njQuery:\r\n$('#date1').on('change', function() {\r\nvar minDate = moment($(this).val(), \"DD/MM/YYYY\").add(1,'days' );\r\nvar datepicker2 = UIkit.datepicker($('#date2'), { minDate: minDate.format(\"DD/MM/YYYY\"),format:'DD/MM/YYYY' });\r\n});\r\n    \r\n $('#date2').on('change', function() {\r\nvar maxDate = moment($(this).val(), \"DD/MM/YYYY\").subtract(1,'days' );\r\nvar datepicker1 = UIkit.datepicker($('#date1'), { minDate:0, maxDate: maxDate.format(\"DD/MM/YYYY\"),format:'DD/MM/YYYY' });\r\n});"}}