当前位置: 代码迷 >> Web前端 >> jMonthCalendar jQuery台历控件应用
  详细解决方案

jMonthCalendar jQuery台历控件应用

热度:79   发布时间:2012-10-06 17:34:01.0
jMonthCalendar jQuery日历控件应用
    <script type="text/javascript">
   
      var   str   =   '2011-03-24';  
        var   d   =   new   Date(Date.parse(str.replace(/-/g,   "/")));
        $().ready(function() {
var options = {
height: 650,
width: 970,
navHeight: 25,
labelHeight: 25,
calendarStartDate:d, //指定到传入的字符串日期位置 onMonthChanging: function(dateIn) {

return true;
},
onEventLinkClick: function(event) {
alert("event link click");
return true;
},
onEventBlockClick: function(event) {
alert("block clicked");
return true;
},
onEventBlockOver: function(event) {
//alert(event.Title + " - " + event.Description);
return true;
},
onEventBlockOut: function(event) {
return true;
},
onDayLinkClick: function(date) {
alert(date.toLocaleDateString());
return true;
},
onDayCellClick: function(date) {
alert(date.toLocaleDateString());
return true;
}
};


var events = [ { "EventID": 1, "Date": "2011-03-22", "Title": "test1", "URL": "#", "Description": "111" ,"CssClass":"dutyChief"},
                { "EventID": 7, "Date": "2011-03-22", "Title": "test11", "URL": "#", "Description": "111"},
{ "EventID": 2, "Date": "2011-03-23", "Title": "test2", "URL": "#", "Description": "111"},
{ "EventID": 3, "Date": "2011-03-24", "Title": "test3", "URL": "#", "Description": "111"},
{ "EventID": 4, "Date": "2011-03-25", "Title": "test4", "URL": "#", "Description": "111"},
{ "EventID": 5, "Date": "2011-03-26", "Title": "test5", "URL": "#", "Description": "111","CssClass":"dutyChief"}
];


$.jMonthCalendar.Initialize(options, events);

    </script>
  相关解决方案