datepicker示例

<html> 

<head> 

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 

<title>jQuery Datepicker</title> 

<script type="text/javascript" src="jquery-1.3.2.js"></script> 

<script type="text/javascript" src="jquery.datepick.js"></script> 

<script type="text/javascript" src="jquery.datepick-zh-CN.js"></script> 

<script type="text/javascript"> 

$(function() { 

var nowdays = new Date(); 

var dateConfig = { 

showOn: 'both',               //二个都显示 

buttonImage: 'calendar.gif',  //加载图片 

buttonImageOnly: true,        //显示图片的地方有一个突出部分,这个就是隐藏那玩意的 

changeFirstDay: false,        //这个参数干什么的呢,星期一是日历的第一个,不可以改动的 

numberOfMonths: 2,            //显示二个月,默认一个月 

minDate: nowdays,             //显示最小时间是今天 

dateFormat: 'yy-mm-dd',       //日期格式 

yearRange: '-20:+20'          //前后20年,不过这根minDate是今天有冲突,自己去试吧。 

}; 

$('#goodplugin').datepick(dateConfig); 

$('#showdate').datepick(dateConfig); 

}); 

</script> 

<link type="text/css" href="smoothness.datepick.css" rel="stylesheet" /> 

</head> 

<body> 

<h1>jquery 日历插件举例</h1> 

<br> 

<a href="datepick1.html">样式1</a> 

<br> 

<a href="datepick2.html">样式2</a> 

<br> 

<a href="datepick3.html">样式3</a> 

<br><br><br> 

<div id="showdate"></div> 

<br> 

<br> 

<div>左边直接显示,右边要点击<input type="text" id="goodplugin"/></div> 

</body> 

</html> 

原文:

http://blog.51yip.com/jsjquery/884.html

http://blog.51yip.com/demo/datepick/datepick3.html

http://blog.51yip.com/demo/datepick/jquery-1.3.2.js

http://blog.51yip.com/demo/datepick/jquery.datepick.js

http://blog.51yip.com/demo/datepick/jquery.datepick-zh-CN.js

http://blog.51yip.com/demo/datepick/humanity.datepick.css

http://docs.jquery.com/UI/Datepicker#options

多个示例:

http://jqueryui.com/datepicker/

http://jqueryui.com/datepicker/#dropdown-month-year

http://www.open-open.com/ajax/ajax20080626102652.htm

http://polaris.blog.51cto.com/1146394/259318

http://www.eyecon.ro/datepicker/#about

posted @ 2012-10-21 22:20  浪里飞  阅读(3043)  评论(0编辑  收藏  举报