From 1e33b7541e651124e40c8364ea9f75d598e26aa7 Mon Sep 17 00:00:00 2001 From: bohung Date: Fri, 18 Sep 2020 21:30:42 +0800 Subject: [PATCH] Update temp file. --- temp_file/app/helpers/orbit_form_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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')