datepicker tryout

This commit is contained in:
Andreas Stephanides
2013-08-28 16:47:33 +02:00
parent 23c1f50325
commit 3c755d09db
7 changed files with 48 additions and 18 deletions

View File

@@ -1,6 +1,24 @@
class DatepickerInput < FormtasticBootstrap::Inputs::StringInput
def input_html_options
super.merge(:class => "datepicker")
super.merge(:class => "input-append date")
end
def html_options
super.merge(:default => Date.today)
end
def wrapper_html_options
super.merge(:class=>"datepicker",'date-date-format'.to_sym=>"%d.%m.%Y")
end
def controls_wrapper_html_options
super.merge(:class=> "controls", 'date-date'.to_sym =>Time.now.to_date.to_s)
end
#def to_html
# bootstrap_wrapping do
# builder.text_field(method, input_html_options)
# end
#end
def options
super#d.merge(:class=>"datepicker")
#super.merge(:append_content=>'<span class="add-on input-append"
#super.merge(:append_content=>'<span class="add-on" ><i class="icon-th"></i></span>')
end
end