Zeit formatiert

Datetimepicker fixed, Speichern und weiter
This commit is contained in:
2014-06-21 16:36:30 +05:30
parent 6c9a1b51c4
commit a87990c338
6 changed files with 25 additions and 17 deletions

View File

@@ -1,19 +1,21 @@
class DatetimepickerInput < FormtasticBootstrap::Inputs::StringInput
def input_html_options
super
super.merge(:class => "datetimepicker",:value=>builder.to_s)
s=super
value=builder.object.send(method)
value=I18n.l(value) unless value.nil?
super.merge(:class => "datetimepicker",:value=>value)
end
def html_options
super
end
def wrapper_html_options
super.merge(:class=>"")
#super.merge(:class=>"datepicker",'date-date-format'.to_sym=>"%d.%m.%Y")
end
def controls_wrapper_html_options
super.merge(:class=> " date input-append", 'data-date'.to_sym =>I18n.l(Date.today()).to_s, 'data-date-format'.to_sym=>I18n.t('date.formats.default-picker'), 'data-time-format'.to_sym=>"hh:mm" ,)
super.merge(:class=> " date input-append", 'data-date'.to_sym =>I18n.l(Date.today()).to_s, 'data-date-format'.to_sym=>I18n.t('date.formats.default-picker'))
end
def to_html
bootstrap_wrapping do