该日历控件采用js编写,来自MS的 http://expo.live.com,本站整理,希望对大家有用。
本程序中需要的两个图片:
http://expo.live.com/Images/leftArrow.gif
http://expo.live.com/Images/rightArrow.gif
Global.css
td.negDate a
{
color: #808080;
}
.calendar
{
padding-left: 4px;
padding-right: 4px;
}
.calendar table
{
border-bottom: solid 1px #366AB3;
text-align: center;
padding: 0;
}
.calendar table a
{
color: black;
}
.calendar td {
padding: 4px;
font-size: 8pt;
font-weight: lighter;
}
.calendarhd
{
color: #366AB3;
text-transform: uppercase;
}
.calendarDays
{
border-bottom: solid 1px;
color: #808080;
padding: 0;
margin: 0;
}
.selectedDate {
background: orange;
}
.selectedDate a {
color: white !important;
}
Global.js
var calendar_DayNames = new Array("日","一","二","三","四","五","六");
var calendar_MonthNames = new Array("一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月");
function showCalendar(targetID, targetURL, dMonth, dYear, dDay)
{
if(dMonth < 0)
{
dMonth = 11;
dYear--;
}