<% unless @content.errors[:base].nil? %>
  <%= @content.errors[:base] %>
<% else %>
  <p> Choose a date to see specific project results: </p>
  <div id="datepicker">
    <input id="datepicker_field" style="display:none"/> 
  </div>
   
  <h4><%= _('Last Result') %></h4>

  <table>
    <tr>
      <td><%= _('Date') %></td>
      <td><%= @project_result.date %></td>
    </tr>
    <tr>
      <td><%= _('Load time') %></td>
      <td><%= @project_result.formatted_load_time %></td>
    </tr>
    <tr>
      <td><%= _('Analysis time') %></td>
      <td><%= @project_result.formatted_analysis_time %></td>
    </tr>
  </table>
  
  
  <script>
	  jQuery(document).ready(function($) {
  	  $("#datepicker").datepicker({ altField: '#datepicker_field', showOn: 'button', dateFormat: "yy-mm-dd",
  	  															buttonImageOnly: true, buttonImage: '/images/calendar_date_select/calendar.png',
  	  															onSelect: function(dateText, inst) {
  	  																reloadProjectWithDate(dateText) } });
																		});
  </script>
  
<% end %>

<% unless @content.errors[:base].nil? %>
  <%= @content.errors[:base] %>
<% else %>
  <p> Choose a date to see specific project results: </p>
  <div id="datepicker" data-date="<%= @project_result.date %>">
    <input id="datepicker_field" style="display:none"/> 
  </div>
   
  <h4><%= _('Last Result') %></h4>

  <table>
    <tr>
      <td><%= _('Date') %></td>
      <td><%= @project_result.date %></td>
    </tr>
    <tr>
      <td><%= _('Load time') %></td>
      <td><%= @project_result.formatted_load_time %></td>
    </tr>
    <tr>
      <td><%= _('Analysis time') %></td>
      <td><%= @project_result.formatted_analysis_time %></td>
    </tr>
  </table>
  
  
  <script>
	  jQuery(document).ready(function($) {
  	  $("#datepicker").datepicker({ altField: '#datepicker_field', showOn: 'button', dateFormat: "yy-mm-dd",
  	  															buttonImageOnly: true, buttonImage: '/images/calendar_date_select/calendar.png',
  	  															onSelect: function(dateText, inst) {
  	  															reloadProjectWithDate(dateText) } });
  	  var date = jQuery("#datepicker").attr('data-date').substr(0,10);
	    $("#datepicker").datepicker( "setDate" , date );
	    
		});
  </script>
  
<% end %>

Set default date to project result date.
[Mezuro] Set default date to project result date.
