diff --git a/temp_file/app/helpers/orbit_form_helper.rb b/temp_file/app/helpers/orbit_form_helper.rb index bffe793..90c38fc 100644 --- a/temp_file/app/helpers/orbit_form_helper.rb +++ b/temp_file/app/helpers/orbit_form_helper.rb @@ -80,7 +80,7 @@ module OrbitFormHelper end def format_value(value, format = 'yyyy-MM-dd hh:mm') - value.strftime(format.gsub('yyyy', '%Y').gsub('MM', '%m').gsub('dd', '%d').gsub('hh', '%H').gsub('mm', '%M')) rescue "" + value.strftime(format.gsub('yyyy', '%Y').gsub('MM', '%m').gsub('dd', '%d').gsub('hh', 'h').gsub('HH','H').gsub('H', '%H').gsub('h', '%H').gsub('mm', '%M')) rescue "" end @@ -112,7 +112,7 @@ module OrbitFormHelper def time_picker(object_name, options) custom = {} - custom[:format] = options[:format] || 'hh:mm' + custom[:format] = options[:format] || 'HH:mm' custom[:value] = format_value(options[:value], custom[:format]) if options[:value] custom[:picker_class] = 'time_picker' custom[:label] = options[:label] || I18n.t('datetime_picker.time.label')