`
zccst
  • 浏览: 3295255 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

jquery【插件】 datepicker插件的使用

 
阅读更多
直接看代码:

代码中引用的所有js文件已打包(见附件1)。jquery-1.6.2.js除外。因为这个跟datepicker没直接关系。
如果想显示中文,直接加上附件2,就行了。

<title>jQuery UI Datepicker - Default functionality</title>

	<link rel="stylesheet" href="../jquery-ui/css/jquery.ui.all.css">
	<script src="../jquery-ui/jquery-1.6.2.js"></script>
	<script src="../jquery-ui/jquery.ui.core.js"></script>
	<script src="../jquery-ui/jquery.ui.widget.js"></script>
	<script src="../jquery-ui/jquery.ui.datepicker.js"></script>
<!--  显示中文  -->
<script src="../jquery-ui/jquery.ui.datepicker-zh-CN.js"></script>
    
	<script>
	
	$(function() {
		$("#datepicker" ).datepicker();
	});
	$(document).ready(function(){
		//alert("fs");
		//$("#datepicker" ).datepicker();
		$("#button").click(function(){
			alert($("#datepicker").val());						
		});
		
	});
	</script>
    
</head>

<body>
<div class="demo">


<input type="text" id="datepicker" />
<input type="button" id="button" value="show" /> 
</div><!-- End demo -->




一些参数设置:
$("#datepicker").datepicker({
	minDate: new Date()
});


注:jqueryui插件下载地址
http://jqueryui.com/download
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics