mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 15:13:21 +08:00
14 lines
721 B
Text
14 lines
721 B
Text
<div class="datetime-picker-container" id="<%= id %>">
|
|
<% if label %>
|
|
<label class="control-label required" for="calendar-<%= id %>"><%= label %></label>
|
|
<% end %>
|
|
<span class="fas fa-calendar-alt"></span>
|
|
<input type="datetime" class="form-control calendar-input" name="calendar[<%= id %>]" id="calendar-<%= id %>" readonly="" data-ts="" placeholder="<%= placeholder %>" value="<%= defined?(setDate) ? setDate : '' %>"/>
|
|
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
var dt = $('#calendar-<%= id %>');
|
|
dt.datetimepicker({ useCurrent: <%= use_current %>, ignoreReadonly: true, locale: '<%= I18n.locale %>', format: '<%= datetime_picker_format_date_only %>' });
|
|
});
|
|
</script>
|
|
</div>
|