JSP日历控件

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
function selected(cal, date) {
cal.sel.value = date; // just update the date in the input field.
if (cal.dateClicked && (cal.sel.id == "sel1" || cal.sel.id == "sel3"))
cal.showsTime = true;
cal.time24 = (showsTime == "24");
}
if (showsOtherMonths) {
cal.showsOtherMonths = true;
}
calendar = cal; // remember it in the global var
cal.callCloseHandler();
}
function closeHandler(cal) {
cal.hide(); // hide the calendar
// cal.destroy();
calendar = null;
return (Math.abs(date.getTime() - today.getTime()) / DAY) > 10;
}
</script>
<input type=text readonly size=12 name="f_date" id=start value="<%=fbrq%>"><input type="reset" value="选择" onclick="return showCalendar('start', '%Y-%m-%d %H:%M', '24', true);">
<link rel="stylesheet" type="text/css" media="all" href="img2/calendar-win2k-cold-2.css" title="win2k-cold-2" />
<script type="text/javascript" src="img2/calendar.js"></script>
return false;
}
var MINUTE = 60 * 1000;
var HOUR = 60 * MINUTE;
var DAY = 24 * HOUR;
var WEEK = 7 * DAY;
function isDisabled(date) {
var today = new Date();
document.theform.submit() ;
}
function doSearch( method )
{
document.searchform.detail.value = method ;
document.searchform.submit() ;
}
var oldLink = null;
calendar.parseDate(el.value); // try to parse the text in field
calendar.sel = el; // inform it what input field we use
// the reference element that we pass to showAtElement is the button that
cal.setRange(1900, 2070); // min/max year allowed.
cal.create();
}
calendar.setDateFormat(format); // set the specified date format
}
function showCalendar(id, format, showsTime, showsOtherMonths) {
var e);
if (calendar != null) {
// we already have some calendar created
// triggers the calendar. In this example we align the calendar bottom-right
// to the button.
calendar.showAtElement(el.nextSibling, "Br"); // show the calendar
<script type="text/javascript" src="img2/calendar-zh.js"></script>
<script language="javascript" >
function doAction ( action )
{
document.theform.action.value = action ;
calendar.hide(); // so we hide it first.
} else {
var cal = new Calendar(true, null, selected, closeHandler);
if (typeof showsTime == "string") {
相关文档
最新文档