vendredi 8 juin 2018

checkbox in more raws with limit

i have a list with days and weeks.

If someone checks one of the days of week 1 all the other days should be disabled and the whole next 2 weeks should be disabled. And another point is that the user may only check max 5 times.

F.e. we have a list from week1 to week20 if I check Wednesday in Week 3 all the other days should be disabled and the next 2 weeks (week 4 and 5) should be disabled and I may only check max 5 times. This means that I max only check one day of the weeks 3,6,9,12,15

What should I change? name,id,class? I can't fix this please help me. Thx.

<table>
            <tr>
                <th style="text-align: center;">W</th>
                <th style="text-align: center;">from</th>
                <th style="text-align: center;">to</th>
                <th style="text-align: center;">Mo</th>
                <th style="text-align: center;">Tu</th>
                <th style="text-align: center;">We</th>
                <th style="text-align: center;">Th</th>
                <th style="text-align: center;">Fr</th>
                <th style="text-align: center;">Sa</th>
                <th style="text-align: center;">So</th>
            </tr>
            <! --- KALENDERWOCHE 1 --->
            <tr>
                <td style="text-align: center;">Week1</td>
                <td style="text-align: center;">0000</td>
                <td style="text-align: center;">9999</td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kw1m1" value="k1m1" class="kalwo1"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kw1m2" value="k1m2" class="kalwo1"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kw1m3" value="k1m3" class="kalwo1"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kw1m4" value="k1m4" class="kalwo1"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kw1m5" value="k1m5" class="kalwo1"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kw1m6" value="k1m6" class="kalwo1"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kw1m7" value="k1m7" class="kalwo1"></td>
            </tr>
            <! --- KALENDERWOCHE 2 --->
            <tr>
                <td style="text-align: center;">Week2</td>
                <td style="text-align: center;">0000</td>
                <td style="text-align: center;">9999</td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm1"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm2"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm3"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm4"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm5"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm6"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm7"></td>
            </tr>
            <! --- KALENDERWOCHE 3 --->
            <tr>
                <td style="text-align: center;">Week3</td>
                <td style="text-align: center;">0000</td>
                <td style="text-align: center;">9999</td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm1"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm2"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm3"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm4"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm5"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm6"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm7"></td>
            </tr>
            <! --- KALENDERWOCHE 4 --->
            <tr>
                <td style="text-align: center;">Week4</td>
                <td style="text-align: center;">0000</td>
                <td style="text-align: center;">9999</td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm1"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm2"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm3"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm4"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm5"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm6"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm7"></td>
            </tr>
            <! --- KALENDERWOCHE 5 --->
            <tr>
                <td style="text-align: center;">Week5</td>
                <td style="text-align: center;">0000</td>
                <td style="text-align: center;">9999</td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm1"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm2"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm3"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm4"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm5"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm6"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm7"></td>
            </tr>
            <! --- KALENDERWOCHE 6 --->
            <tr>
                <td style="text-align: center;">Week6</td>
                <td style="text-align: center;">0000</td>
                <td style="text-align: center;">9999</td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm1"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm2"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm3"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm4"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm5"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm6"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm7"></td>
            </tr>
            <! --- KALENDERWOCHE 7 --->
            <tr>
                <td style="text-align: center;">Week7</td>
                <td style="text-align: center;">0000</td>
                <td style="text-align: center;">9999</td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm1"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm2"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm3"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm4"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm5"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm6"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm7"></td>
            </tr>
            <! --- KALENDERWOCHE 8 --->
            <tr>
                <td style="text-align: center;">Week8</td>
                <td style="text-align: center;">0000</td>
                <td style="text-align: center;">9999</td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm1"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm2"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm3"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm4"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm5"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm6"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm7"></td>
            </tr>
            <! --- KALENDERWOCHE 9 --->
            <tr>
                <td style="text-align: center;">Week9</td>
                <td style="text-align: center;">0000</td>
                <td style="text-align: center;">9999</td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm1"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm2"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm3"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm4"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm5"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm6"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm7"></td>
            </tr>
            <! --- KALENDERWOCHE 10 --->
            <tr>
                <td style="text-align: center;">Week10</td>
                <td style="text-align: center;">0000</td>
                <td style="text-align: center;">9999</td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm1"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm2"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm3"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm4"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm5"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm6"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm7"></td>
            </tr>
            <! --- KALENDERWOCHE 11 --->
            <tr>
                <td style="text-align: center;">Week11</td>
                <td style="text-align: center;">0000</td>
                <td style="text-align: center;">9999</td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm1"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm2"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm3"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm4"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm5"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm6"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm7"></td>
            </tr>
            <! --- KALENDERWOCHE 12 --->
            <tr>
                <td style="text-align: center;">Week12</td>
                <td style="text-align: center;">0000</td>
                <td style="text-align: center;">9999</td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm1"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm2"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm3"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm4"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm5"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm6"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm7"></td>
            </tr>
            <! --- KALENDERWOCHE 13 --->
            <tr>
                <td style="text-align: center;">Week13</td>
                <td style="text-align: center;">0000</td>
                <td style="text-align: center;">9999</td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm1"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm2"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm3"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm4"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm5"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm6"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm7"></td>
            </tr>
            <! --- KALENDERWOCHE 14 --->
            <tr>
                <td style="text-align: center;">Week14</td>
                <td style="text-align: center;">0000</td>
                <td style="text-align: center;">9999</td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm1"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm2"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm3"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm4"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm5"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm6"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm7"></td>
            </tr>
            <! --- KALENDERWOCHE 15 --->
            <tr>
                <td style="text-align: center;">Week15</td>
                <td style="text-align: center;">0000</td>
                <td style="text-align: center;">9999</td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm1"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm2"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm3"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm4"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm5"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm6"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm7"></td>
            </tr>
            <! --- KALENDERWOCHE 16 --->
            <tr>
                <td style="text-align: center;">Week16</td>
                <td style="text-align: center;">0000</td>
                <td style="text-align: center;">9999</td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm1"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm2"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm3"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm4"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm5"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm6"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm7"></td>
            </tr>
            <! --- KALENDERWOCHE 17 --->
            <tr>
                <td style="text-align: center;">Week17</td>
                <td style="text-align: center;">0000</td>
                <td style="text-align: center;">9999</td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm1"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm2"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm3"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm4"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm5"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm6"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm7"></td>
            </tr>
            <! --- KALENDERWOCHE 18 --->
            <tr>
                <td style="text-align: center;">Week18</td>
                <td style="text-align: center;">0000</td>
                <td style="text-align: center;">9999</td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm1"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm2"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm3"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm4"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm5"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm6"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm7"></td>
            </tr>
            <! --- KALENDERWOCHE 19 --->
            <tr>
                <td style="text-align: center;">Week19</td>
                <td style="text-align: center;">0000</td>
                <td style="text-align: center;">9999</td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm1"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm2"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm3"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm4"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm5"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm6"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm7"></td>
            </tr>
            <! --- KALENDERWOCHE 20 --->
            <tr>
                <td style="text-align: center;">Week20</td>
                <td style="text-align: center;">0000</td>
                <td style="text-align: center;">9999</td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm1"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm2"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm3"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm4"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm5"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm6"></td>
                <td style="text-align: center;"><input type="checkbox" id="tablebaslik" name="kwXm7"></td>
            </tr>
        </table>




Aucun commentaire:

Enregistrer un commentaire