使用jqueryui的日期控件

来源:互联网 发布:数据挖掘就业方向 编辑:程序博客网 时间:2024/05/14 21:36

使用该控件要引用js和css样式表

 <script type="text/javascript" src="js/jquery-ui-1.8.7.custom.min.js"></script><link href="css/jquery-ui-1.8.8.custom.css" rel="stylesheet" /><script type="text/javascript">if (top.location != self.location) top.location = self.location;$(function () {    $.datepicker.regional['zh-CN'] = {        monthNamesShort: ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'],        dayNamesMin: ['7', '1', '2', '3', '4', '5', '6'],        firstDay: 1,        showMonthAfterYear: true,        dateFormat: 'yy/mm/dd',        showOtherMonths: true,        selectOtherMonths: true,        changeMonth: true,        changeYear: true,        showAnim: ""    };    $.datepicker.setDefaults($.datepicker.regional['zh-CN']);    $("#BIRTHDAY").datepicker();});</script><input id="BIRTHDAY" maxlength="20" size="20" runat="server" name="ADateStar" />


对它的赋值

$("#BIRTHDAY").val(json.BIRTHDAY);

对它的读取

 var BIRTHDAY = $("#BIRTHDAY").val() == "" ? "" : $("#BIRTHDAY").val();

原创粉丝点击