比如 几月几号,可以添加备注,标注:哪个同事去XXX办事一般用JS弄个日历显示很容易,这样的控件很多,关键是在日历上添加备注信息
有什么好的思路?

解决方案 »

  1.   

    直接用google的calendar就可以了啊。另外jQuery UI可以有这个tooltip功能的。 jQuery(function(){ // Datepicker
    jQuery('#datepicker').datepicker({
    inline: true,
    changeMonth: true,
    changeYear: true,
    beforeShowDay: function(date){
       var weeks = date.getDay();
       var texts = "";
       if (weeks == 0)
        texts = "休日";
       /* 休日のチェック */
       if(date.isJpHoliday()) {
        texts = date.jp_hol_name;
        // description = d.jp_hol_desc;
        weeks = 0;
       }
       if (weeks == 0)
        return [true, 'days_red', texts];
       else if (weeks == 6)
        return [true, 'days_blue', texts];
       return [true, 'days_black'];
      } });
    jQuery('#datepicker').datepicker('option', {dateFormat: 'yy年m月d日'});
    jQuery('#datepicker').datepicker('option', 'dayNamesMin', ['日', '月', '火', '水', '木', '金', '土']);

    jQuery('#datepicker').datepicker('option', 'monthNamesShort', ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']);

    });引用的js文件就不贴了,js里面的texts就是备注了,可以根据不同的条件改。