Skip to content

Commit

Permalink
added default values for date/time inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
Haris Khan committed Nov 1, 2010
1 parent ea1c8ac commit 625582c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/views/contents/form_elements/_dates.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@
<div class="field datetime">
<%= form.label :start_time %>
<div class="fieldbox">
<%= text_field("graphic", "start_date", :maxlength => 20, :class => "datefield")%><a id="date_start" class="button date">&nbsp;</a>
<%= text_field("graphic", "start_time", :maxlength => 20, :class => "timefield")%><a id="time_start" class="button time">&nbsp;</a>
<%= text_field("graphic", "start_date", :maxlength => 20, :class => "datefield", :value=>Time.now.strftime("%m/%d/%Y"))%><a id="date_start" class="button date">&nbsp;</a>
<%= text_field("graphic", "start_time", :maxlength => 20, :class => "timefield", :value=>"12:00 am")%><a id="time_start" class="button time">&nbsp;</a>
</div>
</div>
<div class="field datetime">
<%= form.label :end_time %>
<div class="fieldbox">
<%= text_field("graphic", "end_date", :maxlength => 20, :class => "datefield")%><a id="date_end" class="button date">&nbsp;</a>
<%= text_field("graphic", "end_time", :maxlength => 20, :class => "timefield")%><a id="time_end" class="button time">&nbsp;</a>
<%= text_field("graphic", "end_date", :maxlength => 20, :class => "datefield", :value=>7.days.from_now.strftime("%m/%d/%Y"))%><a id="date_end" class="button date">&nbsp;</a>
<%= text_field("graphic", "end_time", :maxlength => 20, :class => "timefield", :value=>"11:59 pm")%><a id="time_end" class="button time">&nbsp;</a>
</div>
</div>

0 comments on commit 625582c

Please sign in to comment.