Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clicking the button again should close the timepicker. #11

Closed
domharrington opened this issue Mar 17, 2015 · 8 comments
Closed

Clicking the button again should close the timepicker. #11

domharrington opened this issue Mar 17, 2015 · 8 comments

Comments

@domharrington
Copy link
Contributor

No description provided.

@bengourley
Copy link
Owner

I'm not sure I agree with this. @jackbrewer what do you think?

@jackbrewer
Copy link

Hard to say as I haven't really 'used' it let as a CMS user, just testing as a dev.

I can see how it can cause minor annoyances as it is now though:

  • Click an input in a form, date picker appears
  • Click a day in the datepicker, original form's input gets filled in
  • Click next input in the original form, previous input's datepicker stays open, obscuring your view.

This is maybe another issue, in that focussing a different input could close all other datepickers, or even clicking anywhere outside the datepicker. Not really what Dom is asking for though. I can see the advantage of leaving it open when you are clicking dates, so you can change your mind, or correct a mis-placed click.

@bengourley
Copy link
Owner

If it closes upon clicking a date, you never get a chance to select a time.

@jackbrewer
Copy link

Yeah, I think I said that in an odd way. It's fine to leave open for as long as we can so you can do the time / change your mind and choose different dates etc, but maybe we could try to detect when the User is finished - signified by a click outside the datepicker, or maybe by them focussing a different input (outside the datepicker).

@domharrington
Copy link
Contributor Author

I feel like when clicking a button to perform an action, clicking the same button again should reverse the action. This stood out to me more in the date preview view where there is a button labelled "pick a date" to open.

I think Jack and I are discussing 3 different use cases for closing:

  • clicking the button twice
  • clicking into the datepicker then clicking away
  • opening a datepicker when another one is already visible

@bengourley
Copy link
Owner

Ok, so:

  1. Clicking the button twice should happen in anytime
  2. Clicking into the datepicker then clicking away should happen in anytime
  3. Opening a datepicker when another one is already visible anytime already has this feature. Each instance will close any other open instances when being opened itself

I think we should add 1. as an option which defaults to off. 2. should be normal behaviour.

@jackbrewer
Copy link

👍 Sorry for adding confusion, In my head, anytime is still only attached to inputs.

@bengourley
Copy link
Owner

All of these actions now happen as default behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants