Sha256: e0aded521ece100a439c6b8118b53c493fd4797302fa7298beed978a5faac8c0

Contents?: true

Size: 519 Bytes

Versions: 7

Compression:

Stored size: 519 Bytes

Contents

# frozen_string_literal: true

# Add a date-field, either specifying everything manually or using a model object on the form
#
# == Basic usage:
#    {%date_field name:"start_date" value:"2019-09-27"%}
#
# == Advanced usage:
#    {%date_field start_date%}
#
# This last usage requires a model on the form
#

require_relative './text_field_tag'

class DateFieldTag < TextFieldTag
  def initialize(tag, args, tokens)
    super
    @field_type = 'date'
  end
end

Liquid::Template.register_tag('date_field', DateFieldTag)

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
scribo-1.0.44 lib/scribo/liquid/tags/date_field_tag.rb
scribo-1.0.43 lib/scribo/liquid/tags/date_field_tag.rb
scribo-1.0.42 lib/scribo/liquid/tags/date_field_tag.rb
scribo-1.0.41 lib/scribo/liquid/tags/date_field_tag.rb
scribo-1.0.40 lib/scribo/liquid/tags/date_field_tag.rb
scribo-1.0.39 lib/scribo/liquid/tags/date_field_tag.rb
scribo-1.0.38 lib/scribo/liquid/tags/date_field_tag.rb