タグ

ブックマーク / bougyuusonnin.seesaa.net (1)

  • jQuery:UI datepickerの週末に色をつける

    jQuery UI datepickerの日付に任意の色をつけるには、beforeShowイベントとonChangeMonthYearイベントで、日付の文字色を変更する。※イベントが発生した時点で色付けしようとしてもダメなので、setTimeoutで処理を遅延して実行させる。 function setWeekendColor() { var tr = $("table.ui-datepicker-calendar > tbody > tr"); for (var i = 0; i < tr.length; i++) { if (tr[i].firstChild.firstChild.style) tr[i].firstChild.firstChild.style.color = "red"; //sunday if (tr[i].lastChild.firstChild.style) tr

    jQuery:UI datepickerの週末に色をつける
    kyouzont
    kyouzont 2011/06/14
    週末に限らず、任意の日付に色づけする方法
  • 1