I solved the CSS problem by re-downloading a custom jQuery UI package and uploading only the main .js file and .css file (together with images), and referring to them in the HTML source:
<script src="res/jquery-2.1.0.min.js"></script>
<script src="res/jquery-ui-1.10.4.custom.min.js"></script>
<link rel="stylesheet" href="res/jqueryui-css-blitzer/jquery-ui-1.10.4.custom.min.css">
I solved the date selection problem by specifying the correct date format rather than using $( this ).val()
, which was a remnant of the date formats example. The correct code is thus:
$( "#from" ).datepicker( "option", "dateFormat", 'yy-mm-dd' );
$( "#to" ).datepicker( "option", "dateFormat", 'yy-mm-dd' );