At the end, this is what works. And I believe it's the best solution, as it works with two non-nested dom-if
, and the html is valid.
I just needed to add a function firstDayOfWeek
which returns true if item.isoWeekday() === 1
.
<templateis="dom-repeat"items="[[days]]"as="o"><templateis="dom-if"if="[[firstDayOfWeek(o)]]"><tr></template><tdclass$="[[dayClass(o)]]"><spanclass="d">[[formatDay(o)]]</span></td><templateis="dom-if"if="[[lastDayOfWeek(o)]]"></tr></template></template>
Post a Comment for "Why Does The Html From Template Dom-if Not Get Applied Here"