update promotion ui
This commit is contained in:
@@ -40,7 +40,7 @@
|
|||||||
$(document).on('turbolinks:load', function() {
|
$(document).on('turbolinks:load', function() {
|
||||||
|
|
||||||
$('.datetimepicker').bootstrapMaterialDatePicker({
|
$('.datetimepicker').bootstrapMaterialDatePicker({
|
||||||
format: 'DD-MM YYYY - HH:mm',
|
format: 'DD-MM-YYYY - HH:mm',
|
||||||
clearButton: true,
|
clearButton: true,
|
||||||
weekStart: 1
|
weekStart: 1
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
<% if !@promotion.promo_start_date.nil?%>
|
<% if !@promotion.promo_start_date.nil?%>
|
||||||
<input type="text" name="promotion[promo_start_date]" value="<%= @promotion.promo_start_date.strftime('%A, %d-%m-%Y') %>" class="datepicker form-control" placeholder="Start Date...">
|
<input type="text" name="promotion[promo_start_date]" value="<%= @promotion.promo_start_date.strftime('%A, %d-%m-%Y') %>" class="datepicker form-control" placeholder="Start Date...">
|
||||||
<% else %>
|
<% else %>
|
||||||
<input type="text" name="promotion[promo_start_date]" class="datepicker form-control" placeholder="Start Date...">
|
<input type="date" name="promotion[promo_start_date]" class="datepicker form-control" placeholder="Start Date...">
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -38,9 +38,9 @@
|
|||||||
<i class="material-icons">date_range</i>
|
<i class="material-icons">date_range</i>
|
||||||
</span>
|
</span>
|
||||||
<% if !@promotion.promo_end_date.nil?%>
|
<% if !@promotion.promo_end_date.nil?%>
|
||||||
<input type="text" name="promotion[promo_end_date]" value="<%= @promotion.promo_end_date.strftime('%A, %d-%m-%Y') %>" class="datepicker form-control" placeholder="Start Date...">
|
<input type="date" name="promotion[promo_end_date]" value="<%= @promotion.promo_end_date.strftime('%A, %d-%m-%Y') %>" class="datepicker form-control" placeholder="Start Date...">
|
||||||
<% else %>
|
<% else %>
|
||||||
<input type="text" name="promotion[promo_end_date]" class="datepicker form-control" placeholder="End Date...">
|
<input type="date" name="promotion[promo_end_date]" class="datepicker form-control" placeholder="End Date...">
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -54,9 +54,9 @@
|
|||||||
<i class="material-icons">access_time</i>
|
<i class="material-icons">access_time</i>
|
||||||
</span>
|
</span>
|
||||||
<% if !@promotion.promo_start_hour.nil?%>
|
<% if !@promotion.promo_start_hour.nil?%>
|
||||||
<input type="text" name="promotion[promo_start_hour]" value="<%= @promotion.promo_start_hour.utc.strftime('%H:%M') %>" class="timepicker form-control" placeholder="Start Time...">
|
<input type="date" name="promotion[promo_start_hour]" value="<%= @promotion.promo_start_hour.utc.strftime('%H:%M') %>" class="timepicker form-control" placeholder="Start Time...">
|
||||||
<% else %>
|
<% else %>
|
||||||
<input type="text" name="promotion[promo_start_hour]" class="timepicker form-control" placeholder="Start Time...">
|
<input type="date" name="promotion[promo_start_hour]" class="timepicker form-control" placeholder="Start Time...">
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user