2021-04-06 19:56:24 +08:00
|
|
|
<% if @editing %>
|
|
|
|
<div class="sci-input-container">
|
|
|
|
<%= label_tag @name, @label %>
|
2021-05-31 17:51:04 +08:00
|
|
|
<div class="datetime-picker-container">
|
2023-06-08 14:33:37 +08:00
|
|
|
<span class="sn-icon sn-icon-calendar"></span>
|
2021-05-31 17:51:04 +08:00
|
|
|
<input type="datetime"
|
|
|
|
name="<%= @name %>"
|
|
|
|
data-toggle='date-time-picker'
|
|
|
|
class="sci-input-field"
|
|
|
|
placeholder="<%= @placeholder %>"
|
|
|
|
data-date-format="<%= datetime_picker_format_date_only %>"
|
|
|
|
data-date-locale="<%= I18n.locale %>"
|
|
|
|
data-date-use-current="false"
|
|
|
|
data-type="DateInputComponent"
|
|
|
|
value="<%= @value.present? ? l(Date.parse(@value), format: :full) : '' %>"/>
|
|
|
|
</div>
|
2021-04-06 19:56:24 +08:00
|
|
|
</div>
|
|
|
|
<% else %>
|
2021-05-31 17:51:04 +08:00
|
|
|
<%= @value.present? ? l(Date.parse(@value), format: :full) : '' %>
|
2021-04-06 19:56:24 +08:00
|
|
|
<% end %>
|