效果:
汉化了一个 jquery calendar plugin , 效果还符合 中国人的使用习惯。。。
使用步骤:
1, 加载需要的js 和 样式
<link href="calendar.css" rel="stylesheet" type="text/css"> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="cal.js"></script>
2,使用
jQuery(document).ready(function () { $('input.one').simpleDatepicker(); // 最基本的 $('input.two').simpleDatepicker({ startdate: 2008, enddate: 2012 }); // 定义年的范围,一般用这个 $('input.three').simpleDatepicker({ chosendate: '9/9/2010', startdate: '6/10/2008', enddate: '7/20/2011' }); //定义当前选择的日期 $('input.four').simpleDatepicker({ x: 45, y: 3 }); //定义日历基于input的显示位置 }); </script> <p><input class="one" name="date" value="" type="text"> <input class="two" name="date" value="" type="text"> <input class="three" name="date" value="" type="text"> <input class="four" name="date" value="" type="text"> </p>
DEMO:
http://blog.wxianfeng.com/demos/calendar
source:
http://www.uushare.com/filedownload?user=fl1429&id=2183466
ref:
http://teddevito.com/demos/calendar.php
http://www.aspxhome.com/javascript/skills/20099/1008917.htm