lib/trestle/form/fields/date_picker.rb in trestle-0.8.7 vs lib/trestle/form/fields/date_picker.rb in trestle-0.8.8
- old
+ new
@@ -1,8 +1,8 @@
module Trestle::Form::Fields::DatePicker
def extract_options!
- options[:prepend] ||= options.key?(:icon) ? options.delete(:icon) : default_icon
- options.merge!(data: { picker: options.key?(:picker) ? options.delete(:picker) : true })
+ options[:prepend] ||= options.delete(:icon) { default_icon }
+ options.reverse_merge!(data: { picker: options.delete(:picker) { true }, allow_clear: true })
super
end
def default_icon