使用该控件要引用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();