Update temp file.

This commit is contained in:
BoHung Chiu 2020-09-18 21:30:42 +08:00
parent 9efed304d9
commit 1e33b7541e
1 changed files with 2 additions and 2 deletions

View File

@ -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')