{"action":"created","issue":{"url":"https://api.github.com/repos/wdullaer/MaterialDateTimePicker/issues/288","repository_url":"https://api.github.com/repos/wdullaer/MaterialDateTimePicker","labels_url":"https://api.github.com/repos/wdullaer/MaterialDateTimePicker/issues/288/labels{/name}","comments_url":"https://api.github.com/repos/wdullaer/MaterialDateTimePicker/issues/288/comments","events_url":"https://api.github.com/repos/wdullaer/MaterialDateTimePicker/issues/288/events","html_url":"https://github.com/wdullaer/MaterialDateTimePicker/issues/288","id":196693630,"number":288,"title":"Showing year picker first should show month view after clicking OK","user":{"login":"dimsuz","id":42920,"avatar_url":"https://avatars.githubusercontent.com/u/42920?v=3","gravatar_id":"","url":"https://api.github.com/users/dimsuz","html_url":"https://github.com/dimsuz","followers_url":"https://api.github.com/users/dimsuz/followers","following_url":"https://api.github.com/users/dimsuz/following{/other_user}","gists_url":"https://api.github.com/users/dimsuz/gists{/gist_id}","starred_url":"https://api.github.com/users/dimsuz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimsuz/subscriptions","organizations_url":"https://api.github.com/users/dimsuz/orgs","repos_url":"https://api.github.com/users/dimsuz/repos","events_url":"https://api.github.com/users/dimsuz/events{/privacy}","received_events_url":"https://api.github.com/users/dimsuz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-12-20T14:59:26Z","updated_at":"2016-12-23T16:36:26Z","closed_at":null,"body":"Consider this scenario: my form has some kind of birthday date field and whenever user clicks on it, date picker is shown with `showYearPickerFirst=true`. Let's assume that field already contains some date picked earlier and user wants to change the day or month but not a year. So my app passes some initial date to MDTP and opens it.\r\n\r\nThe thing is that in this case when year picker is shown (first), the button `OK` will *close* the dialog while I would expect that it switches to a month view, i.e. continues the selection flow.\r\n\r\nJust like it does when user picks a different year.\r\n\r\nI.e. current flow is not very consistent in this case: If user picks another year than was preselected, the month view is shown next, but if user clicks OK on year picker (leaving the year unchanged), dialog gets closed. You could try it \"live\" to understand better. I feel that this is counterintuitive, but maybe it's just me?\r\n\r\nIf you are in favor of this change, I could submit a PR - I decided to ask before trying to implement this feature. Maybe I got something wrong."},"comment":{"url":"https://api.github.com/repos/wdullaer/MaterialDateTimePicker/issues/comments/269015025","html_url":"https://github.com/wdullaer/MaterialDateTimePicker/issues/288#issuecomment-269015025","issue_url":"https://api.github.com/repos/wdullaer/MaterialDateTimePicker/issues/288","id":269015025,"user":{"login":"wdullaer","id":6305221,"avatar_url":"https://avatars.githubusercontent.com/u/6305221?v=3","gravatar_id":"","url":"https://api.github.com/users/wdullaer","html_url":"https://github.com/wdullaer","followers_url":"https://api.github.com/users/wdullaer/followers","following_url":"https://api.github.com/users/wdullaer/following{/other_user}","gists_url":"https://api.github.com/users/wdullaer/gists{/gist_id}","starred_url":"https://api.github.com/users/wdullaer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wdullaer/subscriptions","organizations_url":"https://api.github.com/users/wdullaer/orgs","repos_url":"https://api.github.com/users/wdullaer/repos","events_url":"https://api.github.com/users/wdullaer/events{/privacy}","received_events_url":"https://api.github.com/users/wdullaer/received_events","type":"User","site_admin":false},"created_at":"2016-12-23T16:36:26Z","updated_at":"2016-12-23T16:36:26Z","body":"So here's a suggestion:\r\nShow a year only picker, and then launch a date only picker from the callback.\r\nIn this case, you have to always click OK to advance to the next stage. (although there is no obvious way to return back to the year selection)\r\n\r\nThis isn't currently supported by the library, but could quite easily be implemented on the marshmallow layout I think.\r\n\r\nI don't want to change the behaviour that the OK button closes the dialog."}}
{"actor":{"display_login":"wdullaer"}}