unmade / am-date-picker

angular material date picker
MIT License
21 stars 13 forks source link

Canceling year selection #3

Closed SirDarquan closed 8 years ago

SirDarquan commented 8 years ago

The year selection option is really nice to have but if you accidentally clicked it, there's no way to undo that without closing the whole picker. I believe you need to capture the escape key when the year picker is open so escape can cancel year selection and change the "Today" and "OK" buttons to just "Cancel" to give users a way to close it with the mouse. Clicking the current year is an option to "cancel" the operation but doesn't feel as natural as having a cancel mechanism.

unmade commented 8 years ago

Yeah, definitely it should be. Gonna work on this in the nearest weekend.

unmade commented 8 years ago

Finally made it. When the year picker is open there is 'Back' button now. No capturing for ecs key, cause it stands for closing the whole picker.

SirDarquan commented 8 years ago

That works. I only made the esc capture suggestion because it feels like a dropdown type functionality and that's how one usually cancels that. Good Job.