Sha256: 5a427be21240721db32b649b8fffb2524313bcf5e8b5ccdccc97fdcdd9fbad19
Contents?: true
Size: 688 Bytes
Versions: 36
Compression:
Stored size: 688 Bytes
Contents
module Avo module Fields class DateField < TextField attr_reader :first_day_of_week attr_reader :picker_format attr_reader :disable_mobile attr_reader :format def initialize(id, **args, &block) super(id, **args, &block) add_string_prop args, :first_day_of_week, 1 add_string_prop args, :picker_format, "Y-m-d" add_string_prop args, :format, "yyyy-LL-dd" add_boolean_prop args, :disable_mobile end def formatted_value return if value.blank? value.iso8601 end def edit_formatted_value return nil if value.nil? value.iso8601 end end end end
Version data entries
36 entries across 36 versions & 1 rubygems