Update temp file.
This commit is contained in:
parent
9efed304d9
commit
1e33b7541e
|
@ -80,7 +80,7 @@ module OrbitFormHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def format_value(value, format = 'yyyy-MM-dd hh:mm')
|
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
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ module OrbitFormHelper
|
||||||
|
|
||||||
def time_picker(object_name, options)
|
def time_picker(object_name, options)
|
||||||
custom = {}
|
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[:value] = format_value(options[:value], custom[:format]) if options[:value]
|
||||||
custom[:picker_class] = 'time_picker'
|
custom[:picker_class] = 'time_picker'
|
||||||
custom[:label] = options[:label] || I18n.t('datetime_picker.time.label')
|
custom[:label] = options[:label] || I18n.t('datetime_picker.time.label')
|
||||||
|
|
Loading…
Reference in New Issue