2016-04-18 9 views

答えて

0

あなたのテーブル行タグが紛失している、私はタグがされる順序を変更することにより、あなたの期待どおりの結果に近いました置いた。これがあなたを助けることを願っています終わり

https://jsbin.com/quvutugijo/1/edit?html,output

0

、これはどのような作品です。そして、それは2つのネストされていないdom-ifで動作し、htmlが有効であるので、それが最良のソリューションだと私は信じています。

firstDayOfWeekという関数を追加するだけで、item.isoWeekday() === 1の場合はtrueを返します。

<template is="dom-repeat" items="[[days]]" as="o"> 
     <template is="dom-if" if="[[firstDayOfWeek(o)]]"><tr></template> 
     <td class$="[[dayClass(o)]]"><span class="d">[[formatDay(o)]]</span></td> 
     <template is="dom-if" if="[[lastDayOfWeek(o)]]"></tr></template> 
    </template>  
関連する問題