mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 09:42:46 +08:00
20 lines
781 B
Text
20 lines
781 B
Text
<% if @editing %>
|
|
<div class="sci-input-container">
|
|
<%= label_tag @name, @label %>
|
|
<div class="datetime-picker-container">
|
|
<span class="fas fa-calendar-alt"></span>
|
|
<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>
|
|
</div>
|
|
<% else %>
|
|
<%= @value.present? ? l(Date.parse(@value), format: :full) : '' %>
|
|
<% end %>
|