注册 登录
编程论坛 ASP技术论坛

日历控件的输出月份的问题

sky222 发布于 2011-04-07 12:36, 500 次点击
调用SelectDate(this,'yyyy 年 MM 月')时,如果当前系统时间为3月31日,选择4月则输出5月。
不知道怎么修改
html代码如下,附件中有js代码,忘大家指点一下
程序代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.">

 
<html xmlns="http://www." >
<head id="Head1">
        <script src="Calendar.js" type="text/javascript"></script>
</head>
<body>
    <form name="form1" method="post" action="WebForm1.aspx" id="form1">
<input type="text" value="" maxlength="100" id="Txt_CreateDateST01"  onclick="SelectDate(this,'yyyy 年')" readonly="true" style="width:265px;cursor:pointer" /><br />
<input type="text" value="" maxlength="100" id="Txt_CreateDateST02"  onclick="SelectDate(this,'yyyy 年 MM 月')" readonly="true" style="width:265px;cursor:pointer" /><br />
<input type="text" value="" maxlength="100" id="Txt_CreateDateST03"  onclick="SelectDate(this,'yyyy\/MM\/dd')" readonly="true" style="width:265px;cursor:pointer" /><br />
<input type="text" value="" maxlength="100" id="Text1"  onclick="SelectDate(this,'yyyy-MM-dd hh时')" readonly="true" style="width:265px;cursor:pointer" /><br />
<input type="text" value="" maxlength="100" id="Text3"  onclick="SelectDate(this,'yyyy-MM-dd hh:mm')" readonly="true" style="width:265px;cursor:pointer" /><br />
<input type="text" value="" maxlength="100" id="Text4"  onclick="SelectDate(this,'yyyy年MM月dd日 hh时mm分ss秒')" readonly="true" style="width:265px;cursor:pointer" /><br />
</form>
</body>
</html>
只有本站会员才能查看附件,请 登录
4 回复
#2
sky2222011-04-07 13:53
是哪里出错了
#3
yms1232011-04-07 14:16
javascript中获得的月份与系统实际日期好像是差1个月的
#4
sky2222011-04-07 14:18
但是如果你换到其他日期就正常,比如今天的日期
#5
sky2222011-04-08 08:51
这个问题没有人解决吗
1