Zurb foundation 如何将简单表单配置为内联datetime元素?基础ZURB
我的问题很简单。我一辈子都搞不懂如何内联简单的表单datetime输入字段。这真让我恼火。我试过几种方法,但似乎都不管用。首先,我阅读了simpleform的文档,什么都没有。从文档中,我尝试了以下方法:Zurb foundation 如何将简单表单配置为内联datetime元素?基础ZURB,zurb-foundation,Zurb Foundation,我的问题很简单。我一辈子都搞不懂如何内联简单的表单datetime输入字段。这真让我恼火。我试过几种方法,但似乎都不管用。首先,我阅读了simpleform的文档,什么都没有。从文档中,我尝试了以下方法: <legend>Start Time</legend> <div class="row"> <div class="medium-3 columns"><%= f.input :start, label: false, as:
<legend>Start Time</legend>
<div class="row">
<div class="medium-3 columns"><%= f.input :start, label: false, as: :date, date: :inline %></div>
</div>
<div class="row">
<div class="medium-3 columns"><%= f.input :start, label: false, as: :time, time: :inline %></div>
</div>
问题是我从哪里开始。我找到了相关的话题,但都是关于引导的。非常感谢您的帮助。多谢各位
config.wrappers :default, class: :input,
hint_class: :field_with_hint, error_class: :field_with_errors do |b|
## Extensions enabled by default
# Any of these extensions can be disabled for a
# given input by passing: `f.input EXTENSION_NAME => false`.
# You can make any of these extensions optional by
# renaming `b.use` to `b.optional`.
# Determines whether to use HTML5 (:email, :url, ...)
# and required attributes
b.use :html5
# Calculates placeholders automatically from I18n
# You can also pass a string as f.input placeholder: "Placeholder"
b.use :placeholder
## Optional extensions
# They are disabled unless you pass `f.input EXTENSION_NAME => :lookup`
# to the input. If so, they will retrieve the values from the model
# if any exists. If you want to enable the lookup for any of those
# extensions by default, you can change `b.optional` to `b.use`.
# Calculates maxlength from length validations for string inputs
b.optional :maxlength
# Calculates pattern from format validations for string inputs
b.optional :pattern
# Calculates min and max from length validations for numeric inputs
b.optional :min_max
# Calculates readonly automatically from readonly attributes
b.optional :readonly
## Inputs
b.use :label_input
b.use :hint, wrap_with: { tag: :span, class: :hint }
b.use :error, wrap_with: { tag: :span, class: :error }
end
# The default wrapper to be used by the FormBuilder.
config.default_wrapper = :default
# Define the way to render check boxes / radio buttons with labels.
# Defaults to :nested for bootstrap config.
# inline: input + label
# nested: label > input
config.boolean_style = :nested