jquery ui datepicker




jquery ui datepicker
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="stylesheet" href="<%=basePath%>jqueryui/development-bundle/themes/base/jquery.ui.all.css">
	<script src="<%=basePath%>jqueryui/development-bundle/jquery-1.9.1.js"></script>
	<script src="<%=basePath%>jqueryui/js/jquery-ui-1.10.3.custom.js"></script>
	<script src="<%=basePath%>jqueryui/development-bundle/ui/jquery.ui.core.js"></script>
	<script src="<%=basePath%>jqueryui/development-bundle/ui/jquery.ui.widget.js"></script>
	<script src="<%=basePath%>jqueryui/development-bundle/ui/jquery.ui.datepicker.js"></script>
	<script src="<%=basePath%>jqueryui/development-bundle/ui/i18n/jquery.ui.datepicker-zh-CN.js"></script>
	<link rel="stylesheet" href="<%=basePath%>jqueryui/development-bundle/demos/demos.css">
	<script>
	$(function() {
		$( "#startDate" ).datepicker({  
			    showAnim:'drop',
			    showButtonPanel:true,
			    dateFormat:"yy-mm-dd",
			}); 
	});
	$(function() {
		$( "#endDate" ).datepicker({  
			     showAnim:'bounce',
			    showButtonPanel:true,
			    dateFormat:"yy-mm-dd",
			}); 
	});
	</script>
</head>
<body>

<p>startDate: <input type="text" id="startDate" name="startDate">   
endDate: <input type="text" id="endDate" name="endDate"></p>

<div class="demo-description">
<p>The datepicker is tied to a standard form input field.  Focus on the input (click, or use the tab key) to open an interactive calendar in a small overlay.  Choose a date, click elsewhere on the page (blur the input), or hit the Esc key to close. If a date is chosen, feedback is shown as the input's value.</p>
</div>
</body>
</html>

你可能感兴趣的:(Datepicker)