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
Fix for HTML attributes being ignored for individual datetime selects. #5861
Conversation
Tests are failing. |
@markstory Fixed code to ensure all tests pass but I am not satisfied with the change. While this fixes problem for methods generating individual time selects you still can't pass attributes when using time() or datetime(). For that I think the attributes extraction I added to Currently any extra attributes passed to |
Is there much utility in having the same attrs applied to each select in a time/datetime compound input? |
* @var array | ||
*/ | ||
protected $_datetimeOptions = [ | ||
'interval', 'round', 'monthNames', 'minYear', 'maxYear', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if each public method passed the list of exclusions to _singleDatetime()?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I had started doing earlier but then switched to using a common list at it was more convenient (lazy). Plus I had thought a single list would be required as I had planned to use it in _datetimeOptions() method.
Hmm someone might want same class applied to each select but apart from that can't think of any other, so perhaps not a good idea. |
One could always use a class on the wrapping div/container in that case. |
Yes and one could add the wrapping div with class to the template so using the html attributes passed to datetime() as attributes for Instead not being able to specifically set class to select elements can be restrictive as some css framework might dictate that. |
Fix for HTML attributes being ignored for individual datetime selects.
Closes #5829