fixed date and time for announcement and news

This commit is contained in:
Harry Bomrah 2015-02-26 14:48:38 +05:30
parent eb21f6535c
commit 3e1032f801
3 changed files with 4 additions and 3 deletions

View File

@ -50,7 +50,8 @@ module OrbitBackendHelper
def default_picker(object_name, method, options)
custom = {}
custom[:format] = options[:format] || 'yyyy/MM/dd hh:mm'
custom[:value] = format_value(options[:value], custom[:format]) if options[:value]
custom[:value] = format_value(options[:value], custom[:format]) if options[:value] && !options[:new_record]
custom[:value] = "" if options[:new_record]
custom[:picker_class] = 'default_picker'
custom[:label] = options[:label] || I18n.t('datetime_picker.default.label')
custom[:placeholder] = options[:placeholder] || I18n.t('datetime_picker.default.placeholder')

View File

@ -103,6 +103,6 @@ module Orbit::FormBuilder
# ActionPack's metaprogramming would have done this for us, if FormHelper#labeled_input
# had been defined at load. Instead we define it ourselves here.
def datetime_picker(method, options = {})
@template.datetime_picker(@object_name, method, objectify_options(options))
# @template.datetime_picker(@object_name, method, objectify_options(options))
end
end

View File

@ -136,7 +136,7 @@ module OrbitHelper
end
def self.set_widget_tags(tags)
@widget_tags = tags;
@widget_tags = tags
end
def self.widget_tags