LoginSignup
0
0

More than 5 years have passed since last update.

jquery datepickerのDOMツリー

Last updated at Posted at 2017-04-05

jqeury ui datepickerをカスタマイズする際にDOMツリーがあると目的の要素にスタイルを当てやすいので共有

【div】 id="ui-datepicker-div" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"
  【div】 class="ui-datepicker-header ui-widget-header ui-helper-clearfix ui-corner-all"
        【a】 class="ui-datepicker-prev ui-corner-all" title="<上月"
             【span】 class="ui-icon ui-icon-circle-triangle-w"
        【a】 class="ui-datepicker-next ui-corner-all" title="下月>"
             【span】 class="ui-icon ui-icon-circle-triangle-e"
        【div】 class="ui-datepicker-title"
             【span】 class="ui-datepicker-year"
             【span】 class="ui-datepicker-month"
   【table】 class="ui-datepicker-calendar"
        【thead】
             【tr】
                  【th】
                  【th】
                  【th】
                  【th】
                  【th】
                  【th】class="ui-datepicker-week-end" //一番左が月曜から始まる場合(週始めによってこのクラスがどこにつくかは変わる
                  【th】class="ui-datepicker-week-end"
        【tbody】
             【tr】//trの数はその月の週数によって変わる
                  //tdは必ず7つある
                  【td】class=" ui-datepicker-other-month ui-datepicker-unselectable ui-state-disabled" //前月の曜日なので表示なし(月によって変わる)
                  【td】class=" ui-datepicker-other-month ui-datepicker-unselectable ui-state-disabled"
                  【td】
                       【a】 class="ui-state-default" href="#"  //日付の数字が入る
                  【td】
                       【a】 class="ui-state-default" href="#"
                  【td】
                       【a】 class="ui-state-default" href="#"
                  【td】class=" ui-datepicker-week-end " //土日なので(どの曜日から始まるかによって位置は変わる
                       【a】 class="ui-state-default" href="#"
                  【td】class=" ui-datepicker-week-end "
                       【a】 class="ui-state-default" href="#"
             【tr】//以下上記同様
             【tr】
             【tr】
             【tr】
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0