Skip to content

Commit

Permalink
Merge pull request #7 from thimios/master
Browse files Browse the repository at this point in the history
24 hour format support
  • Loading branch information
excid3 committed Jun 22, 2013
2 parents ef16f1a + 0b63e1b commit 71883b7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/combined_time_select.rb
Expand Up @@ -60,9 +60,11 @@ def select_minute_with_simple_time_select
ampm_hour = ampm_hour(hour)

val = "#{hour_padded}:#{minute_padded}:00"

option_text = @options[:ampm] ? "#{ampm_hour}:#{minute_padded}#{ampm}" : "#{hour_padded}:#{minute_padded}"
minute_options << ((val_minutes == minute) ?
%(<option value="#{val}" selected="selected">#{ampm_hour}:#{minute_padded}#{ampm}</option>\n) :
%(<option value="#{val}">#{ampm_hour}:#{minute_padded}#{ampm}</option>\n)
%(<option value="#{val}" selected="selected">#{option_text}</option>\n) :
%(<option value="#{val}">#{option_text}</option>\n)
)
end
end
Expand Down

0 comments on commit 71883b7

Please sign in to comment.