Calendar Klasse überarbeitet Views,gefixt, Pictures hinzugefügt

This commit is contained in:
Andreas Stephanides
2013-08-11 01:17:37 +02:00
parent 116446ff63
commit a5a02e065a
17 changed files with 238 additions and 67 deletions

View File

@@ -1,6 +1,7 @@
class DateStringInput < FormtasticBootstrap::Inputs::StringInput
def input_html_options
super.merge(:class => "datetext", :onclick =>"beep", :value=>I18n.l(@object.send(method.to_sym)))
value = (@object.send(method.to_sym))
super.merge(:class => "datetext", :onclick =>"beep", :value=>I18n.l((value.is_a?(Time)||value.is_a?(Date)||value.is_a?(DateTime)) ? value : Time.now))
end
end