Skip to content

Commit

Permalink
Set default value to date picker, change a typo in resource index view.
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoyan1117 committed Nov 4, 2013
1 parent dda74f5 commit 23ccb35
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/views/demand/_demand_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<br>

<%= f.label :start_at %><br>
<input id="demand_start_at" name="demand[start_at]" type="date"><br>
<input id="demand_start_at" name="demand[start_at]" type="date" value=<%=Date.today%>><br>
<br>

<%= f.label :end_at %><br>
<input id="demand_end_at" name="demand[end_at]" type="date"><br>
<input id="demand_end_at" name="demand[end_at]" type="date" value=<%=Date.today%>><br>
<br>

<%= f.label :description %><br>
Expand Down
4 changes: 2 additions & 2 deletions app/views/resource/_resource_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
<%= f.text_area :description %><br>

<%= f.label :available_on %><br>
<input id="resource_start_at" name="resource[start_at]" type="date"><br>
<input id="resource_start_at" name="resource[start_at]" type="date" value=<%=Date.today%>><br>

<%= f.label :end_at %><br>
<input id="resource_end_at" name="resource[end_at]" type="date"><br>
<input id="resource_end_at" name="resource[end_at]" type="date" value=<%=Date.today%>><br>

<%= submit_tag("Submit") %>
<% end %>
2 changes: 1 addition & 1 deletion app/views/resource/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<div class="each_resource">
<div class="r_bg">
<div class="r_name"> <%= r.name %> </div>
<div class="r_des"> <%= r.des %> </div>
<div class="r_des"> <%= r.short_description %> </div>
</div>

<div class="r_sm">
Expand Down

0 comments on commit 23ccb35

Please sign in to comment.