lib/avo/fields/date_field.rb in avo-3.0.0.beta1 vs lib/avo/fields/date_field.rb in avo-3.0.0.pre1

- old
+ new

@@ -18,29 +18,16 @@ end def formatted_value return if value.blank? - try_iso8601 + value.iso8601 end def edit_formatted_value - formatted_value - end + return nil if value.nil? - private - - def try_iso8601 - if value.respond_to?(:iso8601) - value.iso8601 - elsif value.is_a?(String) - parsed = DateTime.parse(value.dup) - if parsed.present? - parsed - end - else - value - end + value.iso8601 end end end end