We have added a simple CSS using the ResourceHandlers. Now, it is the time to test jQuery on a Spring MVC. First Step is to display the calendar object on the jsp.

Insert the scripts and CSS to head part of jsp
http://code.jquery.com/jquery-1.10.2.js
http://code.jquery.com/ui/1.11.0/jquery-ui.js
[code language=”html”]
<sc ript type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.js"></sc ript>
<sc ript type="text/javascript" src="http://code.jquery.com/ui/1.11.0/jquery-ui.js"></sc ript>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.11.0/themes/smoothness/jquery-ui.css">
[/code]
Add the following javascript. Replace expenseDate with your field id
[code language=”javascript”]
$(document).ready(function() {
$(function() {
$("#expenseDate").datepicker();
});
});
[/code]
Thats all. The calendar object should rendered on the browser window.
Pingback: The request sent by the client was syntactically incorrect | JavaShine