This project is archived and is in readonly mode.
select_datetime: Documentation or Implementation Bug
Reported by apeiros | September 15th, 2008 @ 03:01 PM
select_datetime docu states that there was an option :datetime_seperator, but there is no code in either select_datetime nor the delegated select_date that would handle that seperator. So either documentation or implementation is wrong.
Comments and changes to this ticket
-
apeiros September 15th, 2008 @ 03:34 PM
A possible fix for 2.1 (cleaned up the other code too a bit) is attached.
-
Pratik September 18th, 2008 @ 08:53 PM
- Assigned user set to Pratik
- State changed from new to hold
- Tag changed from actionpack, datehelper, helper to actionpack, datehelper, helper
-
CancelProfileIsBroken August 3rd, 2009 @ 03:21 PM
- State changed from hold to open
- Tag changed from actionpack, datehelper, helper to actionpack, bugmash, datehelper, helper
-
Rizwan Reza August 8th, 2009 @ 02:43 PM
verified
+1 This error is happening in 2-3-stable and master.
-
José Valim August 8th, 2009 @ 02:49 PM
- State changed from open to stale
On edge :datetime_separator is available and tested.
-
José Valim August 8th, 2009 @ 02:53 PM
- State changed from stale to invalid
-
José Valim August 8th, 2009 @ 02:56 PM
- State changed from invalid to new
Since Rizwan reported he could verify it, I'm reopening.
-
Rizwan Reza August 8th, 2009 @ 03:46 PM
- Assigned user changed from Pratik to José Valim
- Tag changed from actionpack, bugmash, datehelper, helper to actionpack, bug, bugmash, datehelper, helper
verified
+1 This error is still happening on edge. By glancing at date_helper.rb, I can see that there is some mechanism to tackle separators, but it's not working.
This works:
select_datetime()
But this does not:
select_datetime(:date_separator => '/')
Unfortunately, I can't understand the underlying code. The patch is not working as well.
-
Matt Duncan August 8th, 2009 @ 03:49 PM
- Assigned user changed from José Valim to Pratik
- Tag changed from actionpack, bug, bugmash, datehelper, helper to actionpack, bugmash, datehelper, helper
Not Reproducible.
The following tests in actionpack/test/template/date_helper_test.rb (2-3-stable and master) all use the :datetime_separator option:
- test_select_datetime_with_separators
- test_select_datetime_with_all_separators
- test_datetime_select_with_separators
-
Matt Duncan August 8th, 2009 @ 03:52 PM
- Assigned user changed from Pratik to José Valim
- Tag changed from actionpack, bugmash, datehelper, helper to actionpack, bug, bugmash, datehelper, helper
Fixing Rizwan's user/tag changes that got overwritten with my comment.
-
Rizwan Reza August 8th, 2009 @ 04:05 PM
While creating a test case. I encountered this:
select_datetime(Time.now, {:datetime_separator => "—"})
This is working. The main confusion is that when this works:
select_datetime()
How can this not?
select_datetime({:datetime_separator => "—"})
Conclusion: The first argument is necessary for separators to work.
No bug here. :)
-
José Valim August 8th, 2009 @ 04:11 PM
- State changed from new to invalid
-
CancelProfileIsBroken August 8th, 2009 @ 11:06 PM
- Assigned user cleared.
- Tag changed from actionpack, bug, bugmash, datehelper, helper to actionpack, bug, datehelper, helper
- Milestone cleared.
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>