Date picker separated: reset time when reset date
This commit is contained in:
1 parent
1d405c3ffe
commit
b49251afee
4 files changed
+36
-7
No files matched your search
@@ -6,6 +6,7 @@ module OrbitFormHelper
|
||||
def datetime_picker(object_name, method, options = {})
|
||||
options[:icon_time] ||= 'icons-clock'
|
||||
options[:icon_date] ||= 'icons-calendar'
|
||||
options[:icon_clear] ||= 'icons-cross-3'
|
||||
options[:input_class] ||= 'input-large'
|
||||
options[:value] ||= options[:object][method] if options[:object] && options[:object][method]
|
||||
case options[:picker_type]
|
||||
@@ -82,7 +83,10 @@ module OrbitFormHelper
|
||||
content_tag :div, :class => "#{options[:picker_class]} input-append" 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' do
|
||||
concat (content_tag :span, :class => 'add-on clearDate' do
|
||||
content_tag :i, nil, :class => options[:icon_clear]
|
||||
end)
|
||||
concat (content_tag :span, :class => 'add-on iconbtn' do
|
||||
content_tag :i, nil, 'data-time-icon' => options[:icon_time], 'data-date-icon' => options[:icon_date]
|
||||
end)
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user