Update disable time when separated picker new or reset date

This commit is contained in:
chris committed 2013-01-09 21:17:50 +08:00
1 parent b49251afee
commit 48ce2278d0
2 files changed
+5 -5

No files matched your search

+2 -1
View File
@@ -65,6 +65,7 @@ module OrbitFormHelper
def separated_picker(object_name, method, options)
custom = {}
custom[:no_label] = true
custom[:separated] = true
date_picker(nil, nil, options.merge(custom)) + time_picker(nil, nil, options.merge(custom))
end
@@ -80,7 +81,7 @@ module OrbitFormHelper
end
def picker(object_name, method, options)
content_tag :div, :class => "#{options[:picker_class]} input-append" do
content_tag :div, :class => "#{options[:picker_class]} input-append", :style => "#{(options[:picker_class].eql?('time_picker') && options[:value].blank? && options[:separated]) ? 'pointer-events:none' : nil}" do
concat label_tag options[:label] unless options[:no_label]
concat text_field object_name, method, :placeholder => options[:placeholder], :class => options[:input_class], 'data-format' => options[:format], :value => options[:value]
concat (content_tag :span, :class => 'add-on clearDate' do