scinote-web/app/views/my_modules/_module_header_due_date.html.erb

25 lines
1.2 KiB
Text
Raw Normal View History

<% due_date_editable = can_update_my_module_due_date?(my_module) %>
2020-03-28 00:35:24 +08:00
<span class="date-text" data-editable="<%= due_date_editable %>">
2020-03-28 00:35:24 +08:00
<span id="dueDateLabelContainer" class="view-block">
<%= render partial: "due_date_label.html.erb" , locals: { my_module: my_module, due_date_editable: due_date_editable } %>
</span>
<% if due_date_editable %>
<div class="datetime-picker-container" id="due-date">
2023-06-08 14:33:37 +08:00
<span class="sn-icon sn-icon-calendar"></span>
2020-03-28 00:35:24 +08:00
<input id="calendarDueDate"
type="datetime"
data-toggle='date-time-picker'
class="form-control calendar-input"
readonly
placeholder="<%= t('my_modules.details.no_due_date_placeholder') %>"
2020-03-28 00:35:24 +08:00
data-date-format="<%= datetime_picker_format_full %>"
data-date-locale="<%= I18n.locale %>"
data-date-use-current="false"
2020-05-13 16:58:40 +08:00
data-date-orientation="left"
value="<%= my_module.due_date ? l(my_module.due_date, format: :full) : '' %>"/>
</div>
2023-06-08 23:33:50 +08:00
<span class="sn-icon sn-icon-close clear-date" data-toggle='clear-date-time-picker' data-target='calendarDueDate'></span>
<% end %>
</span>