<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>
<script type="text/javascript" src="img2/calendar-zh.js"></script>
<script language="javascript" >
function doAction ( action )
{
document.theform.action.value = action ;
document.theform.submit() ;
}
function doSearch( method )
{
document.searchform.detail.value = method ;
document.searchform.submit() ;
}
var oldLink = null;
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.callCloseHandler();
}
function closeHandler(cal) {
cal.hide(); // hide the calendar
// cal.destroy();
calendar = null;
}
function showCalendar(id, format, showsTime, showsOtherMonths) {
var el = document.getElementById(id);
if (calendar != null) {
// we already have some calendar created
calendar.hide(); // so we hide it first.
} else {
var cal = new Calendar(true, null, selected, closeHandler);
if (typeof showsTime == "string") {
cal.showsTime = true;
cal.time24 = (showsTime == "24");
}
if (showsOtherMonths) {
cal.showsOtherMonths = true;
}
calendar = cal; // remember it in the global var
cal.setRange(1900, 2070); // min/max year allowed.
cal.create();
}
calendar.setDateFormat(format); // set the specified date format
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
// triggers the calendar. In this example we align the calendar bottom-right
// to the button.
calendar.showAtElement(el.nextSibling, "Br"); // show the calendar
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();
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);">
本文来源:https://www.wddqw.com/doc/9a0636307f1922791788e802.html
正在阅读:
JSP日历控件01-01
国庆节手抄报节日的由来文字稿01-01
《春草散章》阅读答案01-01
以读书笔记为话题的作文小学生五年级200字范文【五篇】01-01
全国各省简称01-01
反省自己检讨书200字(二)01-01
[《繁星》]《春水》冰心原文01-01
做一个诚实的人_小学五年级作文600字01-01
少年情怀总是诗——诗歌创作01-01