0

フォームフィールドのサイズを調整しようとしています。こんなサイズを使ってみました...

<%= f.date_select(:form_date, order: [:month, :day, :year], prompt: { month: 'Select Month', day: 'Select Day', year: 'Select Year' }, start_year: 2000, size: 1) %>

サイズを間違った順序で入力しているだけですか(サイズ:1が最後であってはなりません)?これは私のスタイルシートで最もよく処理されますか?

前もって感謝します。

4

1 に答える 1

1

options と html_options を混ぜていたことが判明

date_select(object_name, method, options = {}, html_options = {}) Link

これが、コード行を上記から変更したものです...

<%= f.date_select(:form_date, options = { order: [:month, :day, :year], prompt: { month: 'Select Month', day: 'Select Day', year: 'Select Year' }, start_year: 2000 }, html_options = { size: 1 }) %>
于 2013-01-21T06:18:31.027 に答える