0
我有simple_form输入,它需要输入datetime。如何删除simple_form中的日期时间分隔符?
= f.input :input, as: :datetime, start_year: DateTime.now.year, label: false, selected: DateTime.now
该代码正在工作,但日期和时间之间有分隔符。格式看起来像这样。
"%d %B %Y-%H:%M"
我该怎么做,所以格式会是这样?
"%d %B %Y %H:%M"
我试过this solution,但没有什么变化。
使用this solution方法代码:
= f.input :input, as: :datetime, date_separator: '', time_separator: '', start_year: DateTime.now.year, label: false, selected: DateTime.now