Here is some sample code to change the select_hour function to include the AM/PM (meridian) indicator. Put this in lib/fix_date.rb.
module ActionView
module Helpers
module DateHelper
def select_hour(datetime, options = {})
hour_options = []
0.upto(23) do |hour|
hour_options << ((datetime && (datetime.kind_of?(Fixnum) ? datetime : datetime.hour) == hour) ?
%(<option value="#{hour}" selected="selected">#{ampm(hour)}</option>\n) :
%(<option value="#{hour}">#{ampm(hour)}</option>\n)
)
end
select_html(options[:field_name] || 'hour', hour_options, options[:prefix], options[:include_blank], options[:discard_type])
end
def ampm(hour)
case hour
when 0 : "12 AM"
when 1..11 : "#{hour} AM"
when 12 : "12 PM"
else "#{hour-12} PM"
end
end
end
end
end
Then add this to the end of your config/environment.rb:
require 'lib/fix_date'
Since you have changed your environment, you will need to restart your web server before the change will take effect.
===
If you want the AM/PM as a separate drop-down, try this plugin: