Skip to content
This repository has been archived by the owner on Dec 17, 2017. It is now read-only.

Commit

Permalink
Use 24hour time in the calendar widget
Browse files Browse the repository at this point in the history
  • Loading branch information
glasnt committed Jul 24, 2014
1 parent 30e8869 commit 6d9c68b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/views/partial/navbar/_time_absolute.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<%= form_for "time", url: absolute_time_path, html: {style: "display: inline-block"} do |f| %>
<% times.each do |b|
val = to_epoch(params[b[:field].to_sym] || b[:default].to_s)
val = Time.at(val.to_i).strftime("%d/%m/%Y %I:%M:%S %p") %>
val = Time.at(val.to_i).strftime("%d/%m/%Y %H:%M:%S") %>

<div class="btn-group" style="font-size: small"><%= b[:label] %></div>
<div class="btn-group" style="width: 230px">
<div class="btn-group" style="width: 200px">
<div id="datetimepicker_<%=b[:field]%>" class="input-group date">
<%= f.text_field "#{b[:field]}_time", class: "form-control", value: val, style: "display: inline-block", data: {validation: 'datetime'} %>
<span class="input-group-addon"><i class="icon-calendar"></i></span>
Expand All @@ -26,7 +26,7 @@
<script type="text/javascript">
$(function() {
<% times.each do |b| %>
format_string = "DD/MM/YYYY HH:mm:ss A"
format_string = "DD/MM/YYYY hh:mm:ss"
$('#datetimepicker_<%=b[:field]%>').datetimepicker({
icons: {
Expand Down

0 comments on commit 6d9c68b

Please sign in to comment.