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

time field highlighting when picked (for always open time picker) #80

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

olivermuc
Copy link

this is setting the 'selected' class to the HTML element picked, which is useful when the time picker stays always open and you want to provide visual feedback of the current choice made, similar to the calendar.

ideally this would be accompanied by a time setting, eg. timeAutoClose: 'never', which would avoid toggling the visibility of the picker. Currently, the workaround is to use CSS to force the time picker parent to always show. It works, but less elegantly.

this is my first pull req - feel free to implement properly, or even
drop it altogether ;-)

time field highlighting when picked, useful for time pickers that stay
open.
@@ -628,6 +630,15 @@ function calendar (calendarOptions) {
if (!classes.contains(target, o.styles.timeOption)) {
return;
}
if (!classes.contains(target, o.styles.selectedTime)) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check is unnecessary

@bevacqua
Copy link
Owner

Make the changes in the comments and please add:

  • set the autoClose default value to 'auto' in src/defaults
  • make sure existing uses where autoClose === true do autoClose === 'auto' instead
  • add a new 'never' option for autoClose that doesn't even auto-close the time list
  • documentation of changes

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

Successfully merging this pull request may close these issues.

2 participants