This project is archived and is in readonly mode.
datetime_select to accept :ampm option
Reported by Yong Bakos | September 9th, 2008 @ 06:28 PM | in 3.x
I'd like to propose the development of a patch to core that adds the capability of the datetime_select to render a 12-hour selectlist for the hour, and an am/pm selectlist.
Previous plugin/module solutions to this are old, I couldn't find anything relevant on github, and this just seems (to me) like it should belong in core.
I belive this this will also require changes to AR.
Patch to come, unless this ticket gets nixed.
Comments and changes to this ticket
-
Geoff Buesing September 15th, 2008 @ 09:06 PM
Seems like a common enough need; I'd like to see it in core.
-
Yong Bakos September 16th, 2008 @ 04:02 PM
- Tag changed from activerecord, enhancement, helper, patch to activerecord, enhancement, helper, patch
Glad to see your support. I hope to have this ready by the end of the month (that thing called 'work' always gets in the way).
-
Jeff October 17th, 2008 @ 07:59 PM
incidentally, http://code.google.com/p/rails-t... seems to work fine with 2.1. Haven't tested it against edge
-
Pratik January 18th, 2009 @ 07:08 AM
- State changed from new to incomplete
-
Pratik January 18th, 2009 @ 07:08 AM
- Assigned user set to Geoff Buesing
-
Eric Mill June 11th, 2009 @ 08:35 PM
I hope this doesn't fall off a cliff; 12-hour time is the way of things in the West, its lack is glaring.
-
Elliot Winkler July 1st, 2009 @ 10:49 PM
The rails-twelve-hour-time plugin linked to above also works in 2.3. You could probably start with that.
-
Daniel Tsadok July 2nd, 2009 @ 04:11 AM
True but it seems like it belongs in core, since it's such a common use case. Also, if you set prompt => true, Rails 2.3 gives a translation error for the prompt for AM/PM.
-
Yong Bakos July 26th, 2009 @ 07:04 PM
I am now (finally) actively working on this. Please stay tuned.
-
Chad Jolly April 16th, 2010 @ 10:42 PM
+1
I did a demo of an app today and the one 24hr time select was the glaring sticking point with the users. Kinda funny. As a quick fix I used some jQuery. Here's the snippet if anyone is interested:
http://gist.github.com/368952Hi Yong.
-
Yuval April 17th, 2010 @ 05:40 AM
+1 I'd like to see this implemented in core as well. I think there's a large enough user base that needs to user a 12-hour format (i.e. doesn't intuitively understand military time) that it should exists as an option under datetime_select.
-
Neeraj Singh April 29th, 2010 @ 12:51 PM
I started working on patch for this issue. However because of inconsistencies between select and select methods I was not able to make a good patch. I opened another ticket https://rails.lighthouseapp.com/projects/8994/tickets/4432 .
Now that #4432 is resolved, I will take another shot at this one.
-
Trevor Turk July 1st, 2010 @ 07:09 PM
- Importance changed from to
Just a quick thanks to Chad Jolly for the jQuery workaround. I'll keep an eye on this ticked in case anything else comes around, but I'm happy enough for now. Thanks :)
-
Matt Todd November 16th, 2010 @ 10:17 AM
Here's a patch for multiparameter_attributes to support a 7th attribute with am/pm.
WIP. Needs accompanying changes to the datetime/time select helpers.
Why does 12am/pm have to be lame? :(
-
rails February 17th, 2011 @ 12:00 AM
- State changed from incomplete to open
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.
Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.
-
rails February 17th, 2011 @ 12:00 AM
- State changed from open to stale
-
Aditya Sanghi April 29th, 2011 @ 06:01 AM
If someone is still keen, I built this functionality and sent a pull request on Github. Please see https://github.com/rails/rails/pull/343
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 4432 datetime_select and select_datetime inconsistent for various options I actually wanted to fix ticket #1004 https://rails.ligh...
- 4432 datetime_select and select_datetime inconsistent for various options I actually wanted to fix ticket #1004 https://rails.ligh...
- 4432 datetime_select and select_datetime inconsistent for various options I actually wanted to fix ticket #1004 https://rails.ligh...