jquery datepicker with month and year
SOLUTION:
<title>jQuery UI Datepicker - Default functionality</title>
<link href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css" rel="stylesheet"></link>
<script src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script src="http://code.jquery.com/ui/1.9.1/jquery-ui.js"></script>
<link href="/resources/demos/style.css" rel="stylesheet"></link>
<script>
<script type="text/javascript" id="Datepicker">
$(function () {
$("#SchedDate").datepicker({ changeMonth: true, changeYear: true,dateFormat:'mm/dd/yy',showMonthAfterYear: true });
$("#StatDate").datepicker({ changeMonth: true, changeYear: true, dateFormat: 'mm/dd/yy', showMonthAfterYear: true });
$("#compDate").datepicker({ changeMonth: true, changeYear: true, dateFormat: 'mm/dd/yy', showMonthAfterYear: true });
});
</script>
Date: <input id="SchedDate" type="text" />
Date: <input id="StatDate" type="text" />
Date: <input id="compDate" type="text" />
SOLUTION:
<title>jQuery UI Datepicker - Default functionality</title>
<link href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css" rel="stylesheet"></link>
<script src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script src="http://code.jquery.com/ui/1.9.1/jquery-ui.js"></script>
<link href="/resources/demos/style.css" rel="stylesheet"></link>
<script>
<script type="text/javascript" id="Datepicker">
$(function () {
$("#SchedDate").datepicker({ changeMonth: true, changeYear: true,dateFormat:'mm/dd/yy',showMonthAfterYear: true });
$("#StatDate").datepicker({ changeMonth: true, changeYear: true, dateFormat: 'mm/dd/yy', showMonthAfterYear: true });
$("#compDate").datepicker({ changeMonth: true, changeYear: true, dateFormat: 'mm/dd/yy', showMonthAfterYear: true });
});
</script>
Date: <input id="SchedDate" type="text" />
Date: <input id="StatDate" type="text" />
Date: <input id="compDate" type="text" />
No comments:
Post a Comment