Skip to content

Instantly share code, notes, and snippets.

@TheLarkInn
Created October 3, 2013 14:48
Show Gist options
  • Save TheLarkInn/6811073 to your computer and use it in GitHub Desktop.
Save TheLarkInn/6811073 to your computer and use it in GitHub Desktop.
reports.erb
<head>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script>
$(function() {
$( "#start_date" ).datepicker();
$( "#end_date" ).datepicker();
$( "#start_date" ).datepicker( "option", "dateFormat", "yy-mm-dd" );
$( "#end_date" ).datepicker( "option", "dateFormat", "yy-mm-dd" );
});
</script>
<script type="text/html" id="ReportViewTemplate">
</script>
</head>
<div id="content">
<p>
<select id="date_range">
<option value="today">Today</option>
<option value="yesterday">Yesterday</option>
<option value="thisWeek">This Week</option>
<option value="lastWeek">Last Week</option>
<option value="thisMonth">This Month</option>
<option value="lastMonth">Last Month</option>
<option value="thisYear">This Year</option>
<option value="lastYear">Last Year</option>
<option value="other">Other</option>
</select>
</p>
<span>Start Date: <input type="text" id="start_date" /></span><span>End Date: <input type="text" id="end_date" /></span>
<div id="report_content">
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment