Sha256: d0fea2f1d391e32b9715b23daa1dddcae6f91f0d909111d66bceec611246fb7a

Contents?: true

Size: 1.29 KB

Versions: 4

Compression:

Stored size: 1.29 KB

Contents

# frozen_string_literal: true

module Playbook
  module PbDatePicker
    class DatePicker
      include Playbook::Props

      partial "pb_date_picker/date_picker"

      prop :default_date, type: Playbook::Props::String,
                          default: ""
      prop :disable_date, type: Playbook::Props::Array,
                          default: []
      prop :disable_range, type: Playbook::Props::Array,
                           default: []
      prop :disable_weekdays, type: Playbook::Props::Array,
                              default: []
      prop :error, type: Playbook::Props::String
      prop :format, type: Playbook::Props::String,
                    default: "m/d/Y"
      prop :label, type: Playbook::Props::String,
                   default: "Date Picker"
      prop :max_date, type: Playbook::Props::String
      prop :min_date, type: Playbook::Props::String
      prop :name, type: Playbook::Props::String
      prop :mode, type: Playbook::Props::String,
                  default: "single"
      prop :picker_id, type: Playbook::Props::String
      prop :required, type: Playbook::Props::Boolean,
                      default: false

      def classname
        generate_classname("pb_date_picker_kit")
      end

      def error_class
        error ? "error" : ""
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
playbook_ui-6.1.0.pre.alpha2 app/pb_kits/playbook/pb_date_picker/date_picker.rb
playbook_ui-6.1.0.pre.alpha1 app/pb_kits/playbook/pb_date_picker/date_picker.rb
playbook_ui-6.0.1.pre.alpha4 app/pb_kits/playbook/pb_date_picker/date_picker.rb
playbook_ui-6.0.1.pre.alpha3 app/pb_kits/playbook/pb_date_picker/date_picker.rb