Sha256: eec8169992db3ebba78c28f3a6effaa327eae2f62660f5b89068ddd20fa54c40
Contents?: true
Size: 685 Bytes
Versions: 108
Compression:
Stored size: 685 Bytes
Contents
# frozen_string_literal: true module PgEngine class FechaInput < SimpleForm::Inputs::StringInput def input(wrapper_options = nil) # esto es porque si no Rails llama a value_before_type_cast value = if object.is_a? Draper::Decorator # Salteo el decorator para que me tome la fecha con formato inglés object.object.public_send(attribute_name) else object.public_send(attribute_name) end @input_type = 'date' options = merge_wrapper_options({ value:, class: '', autocomplete: 'off' }, wrapper_options) super(options) end end end
Version data entries
108 entries across 108 versions & 1 rubygems