首先是引入UI的JS文件和模板文件,如下:

?<link rel=”stylesheet” href=”./ui/themes/le-frog/jquery.ui.all.css”>

?<script src=”./ui/jquery.ui.core.js”></script>
?<script src=”./ui/jquery.ui.widget.js”></script>
?<script src=”./ui/jquery.ui.datepicker.js”></script>

?然后下面就是设置文件了:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
	$<span style="color: #009900">(</span><span style="color: #003366;font-weight: bold">function</span><span style="color: #009900">(</span><span style="color: #009900">)</span> <span style="color: #009900">{</span>
		$<span style="color: #009900">(</span> <span style="color: #3366CC">"#datepicker"</span> <span style="color: #009900">)</span>.<span style="color: #660066">datepicker</span><span style="color: #009900">(</span><span style="color: #009900">)</span><span style="color: #339933">;</span>
	<span style="color: #009900">}</span><span style="color: #009900">)</span><span style="color: #339933">;</span>
	jQuery<span style="color: #009900">(</span><span style="color: #003366;font-weight: bold">function</span><span style="color: #009900">(</span>$<span style="color: #009900">)</span><span style="color: #009900">{</span>  
                $.<span style="color: #660066">datepicker</span>.<span style="color: #660066">regional</span><span style="color: #009900">[</span><span style="color: #3366CC">'zh-CN'</span><span style="color: #009900">]</span> <span style="color: #339933">=</span> <span style="color: #009900">{</span>  
                    closeText<span style="color: #339933">:</span> <span style="color: #3366CC">'关闭'</span><span style="color: #339933">,</span>  
                    prevText<span style="color: #339933">:</span> <span style="color: #3366CC">'<上月'</span><span style="color: #339933">,</span>  
                    nextText<span style="color: #339933">:</span> <span style="color: #3366CC">'下月>'</span><span style="color: #339933">,</span>  
                    currentText<span style="color: #339933">:</span> <span style="color: #3366CC">'今天'</span><span style="color: #339933">,</span>  
                    monthNames<span style="color: #339933">:</span> <span style="color: #009900">[</span><span style="color: #3366CC">'一月'</span><span style="color: #339933">,</span><span style="color: #3366CC">'二月'</span><span style="color: #339933">,</span><span style="color: #3366CC">'三月'</span><span style="color: #339933">,</span><span style="color: #3366CC">'四月'</span><span style="color: #339933">,</span><span style="color: #3366CC">'五月'</span><span style="color: #339933">,</span><span style="color: #3366CC">'六月'</span><span style="color: #339933">,</span>  
                    <span style="color: #3366CC">'七月'</span><span style="color: #339933">,</span><span style="color: #3366CC">'八月'</span><span style="color: #339933">,</span><span style="color: #3366CC">'九月'</span><span style="color: #339933">,</span><span style="color: #3366CC">'十月'</span><span style="color: #339933">,</span><span style="color: #3366CC">'十一月'</span><span style="color: #339933">,</span><span style="color: #3366CC">'十二月'</span><span style="color: #009900">]</span><span style="color: #339933">,</span>  
                    monthNamesShort<span style="color: #339933">:</span> <span style="color: #009900">[</span><span style="color: #3366CC">'一'</span><span style="color: #339933">,</span><span style="color: #3366CC">'二'</span><span style="color: #339933">,</span><span style="color: #3366CC">'三'</span><span style="color: #339933">,</span><span style="color: #3366CC">'四'</span><span style="color: #339933">,</span><span style="color: #3366CC">'五'</span><span style="color: #339933">,</span><span style="color: #3366CC">'六'</span><span style="color: #339933">,</span>  
                    <span style="color: #3366CC">'七'</span><span style="color: #339933">,</span><span style="color: #3366CC">'八'</span><span style="color: #339933">,</span><span style="color: #3366CC">'九'</span><span style="color: #339933">,</span><span style="color: #3366CC">'十'</span><span style="color: #339933">,</span><span style="color: #3366CC">'十一'</span><span style="color: #339933">,</span><span style="color: #3366CC">'十二'</span><span style="color: #009900">]</span><span style="color: #339933">,</span>  
                    dayNames<span style="color: #339933">:</span> <span style="color: #009900">[</span><span style="color: #3366CC">'星期日'</span><span style="color: #339933">,</span><span style="color: #3366CC">'星期一'</span><span style="color: #339933">,</span><span style="color: #3366CC">'星期二'</span><span style="color: #339933">,</span><span style="color: #3366CC">'星期三'</span><span style="color: #339933">,</span><span style="color: #3366CC">'星期四'</span><span style="color: #339933">,</span><span style="color: #3366CC">'星期五'</span><span style="color: #339933">,</span><span style="color: #3366CC">'星期六'</span><span style="color: #009900">]</span><span style="color: #339933">,</span>  
                    dayNamesShort<span style="color: #339933">:</span> <span style="color: #009900">[</span><span style="color: #3366CC">'周日'</span><span style="color: #339933">,</span><span style="color: #3366CC">'周一'</span><span style="color: #339933">,</span><span style="color: #3366CC">'周二'</span><span style="color: #339933">,</span><span style="color: #3366CC">'周三'</span><span style="color: #339933">,</span><span style="color: #3366CC">'周四'</span><span style="color: #339933">,</span><span style="color: #3366CC">'周五'</span><span style="color: #339933">,</span><span style="color: #3366CC">'周六'</span><span style="color: #009900">]</span><span style="color: #339933">,</span>  
                    dayNamesMin<span style="color: #339933">:</span> <span style="color: #009900">[</span><span style="color: #3366CC">'日'</span><span style="color: #339933">,</span><span style="color: #3366CC">'一'</span><span style="color: #339933">,</span><span style="color: #3366CC">'二'</span><span style="color: #339933">,</span><span style="color: #3366CC">'三'</span><span style="color: #339933">,</span><span style="color: #3366CC">'四'</span><span style="color: #339933">,</span><span style="color: #3366CC">'五'</span><span style="color: #339933">,</span><span style="color: #3366CC">'六'</span><span style="color: #009900">]</span><span style="color: #339933">,</span>  
                    weekHeader<span style="color: #339933">:</span> <span style="color: #3366CC">'周'</span><span style="color: #339933">,</span>  
                    dateFormat<span style="color: #339933">:</span> <span style="color: #3366CC">'yy-mm-dd'</span><span style="color: #339933">,</span>  
                    firstDay<span style="color: #339933">:</span> <span style="color: #CC0000">1</span><span style="color: #339933">,</span>  
                    isRTL<span style="color: #339933">:</span> <span style="color: #003366;font-weight: bold">false</span><span style="color: #339933">,</span>  
                    showMonthAfterYear<span style="color: #339933">:</span> <span style="color: #003366;font-weight: bold">true</span><span style="color: #339933">,</span>  
                    yearSuffix<span style="color: #339933">:</span> <span style="color: #3366CC">'年'</span><span style="color: #009900">}</span><span style="color: #339933">;</span>  
                $.<span style="color: #660066">datepicker</span>.<span style="color: #660066">setDefaults</span><span style="color: #009900">(</span>$.<span style="color: #660066">datepicker</span>.<span style="color: #660066">regional</span><span style="color: #009900">[</span><span style="color: #3366CC">'zh-CN'</span><span style="color: #009900">]</span><span style="color: #009900">)</span><span style="color: #339933">;</span>  
<span style="color: #009900">}</span><span style="color: #009900">)</span><span style="color: #339933">;</span>

OK了,就这么简单。有用的朋友直接复制代码过去就OK了。