-
Notifications
You must be signed in to change notification settings - Fork 22.1k
Extend date_select helper functionality. #5553
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
Extend date_select helper functionality. #5553
Conversation
|
You have a typo in description of the method - |
|
This will no longer merge cleanly, and will need a rebase. |
|
@butcher: Would be great to see this kind of feature in the 👍 |
|
I like this. However, having it all the time wouldn't break anything. |
|
Good question. This is a controversial change. Working in SimpleForm some guys complaint about all the automatically generated classes, some guys like and use those classes. I'm 👍 to add theses classes by default, but some people will want to not generate they. |
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.
Perhaps the option could be add_classes or css_classes? Not sure what's the best name - or if there are other better possibilities.
Lets try to move this forward so we can get it merged, thanks.
|
Two months without answers. I'm closing this one. Feel free to ask to reopen if you want to work on it. |
|
@rafaelfranca perhaps I miss notification about your previous comment. I think we should make decision together how to implement this with the best interface. So as I see we have some solutions:
I vote for creating option Please share your opinion and reopen the pull request. Than I reimplement it and prepare valid pull request. I hope it will be helpful for developers that use rails. |
|
Something strange happens when I try to rebase from rails/rails. Funny github:
So I open new one. You can review my changes here #7975 Sorry for cutting discussion. |
Often we need to have date selectors with different styles. (Most often different width.) Unfortunately date_select helper don't provide possibility to set different CSS classes. This commit extend date_select helper with option :css_by_type that set special classes for generated 'select' tags. Class names equal data type, for example:
f.date_select :birthday, :css_by_type => true
generate:
Hope it will by helpfully.