Sha256: 100c46d94f0b34e2a125a8f5228ccb7f9d731286ec75c2ff50d149c6b483a779
Contents?: true
Size: 503 Bytes
Versions: 16
Compression:
Stored size: 503 Bytes
Contents
module Puffer module Inputs class DateTime < Puffer::Inputs::Base def input format = case field.type when :date then '%Y-%m-%d' when :time then '%H:%M:%S' when :datetime, :timestamp then '%Y-%m-%d %H:%M:%S' end builder.text_field field, field.input_options.merge("data-calendar" => "{showButtons: true, listYears: true, format: '#{format}'}", :autocomplete => :off) end end end end
Version data entries
16 entries across 16 versions & 1 rubygems