How to create a 12-hour (with AM / PM) time picker?

I am using rails 3.2.13. I want to show 12 o’clock and am / pm also in the drop down list. Many people seem to be talking about this, but there is no built-in solution for the same.

time_select("post", "written_on", {:ampm => true}) # it gives me just two dropdowns. No dropdown for am/pm f.time_select :written_on, :ampm => true # same here. No third dropdown for am/pm 

Any suggestions?

+4
source share
1 answer

It is best to delegate this to a good client-side JS library. Below I personally use my clients; this is amazing.

http://amsul.ca/pickadate.js/

+1
source

All Articles