Block past weeks in input week

1

I want to block the past weeks to the current one in an input type week so that they are not selectable.

I already appreciate the help! Greetings.

    
asked by BrunoD 23.10.2018 в 21:36
source

1 answer

1

Use the min attribute to set the minimum week you can not practically select it. Here is an example:

<input type="week" name="semana" min="2014-W01" max="2018-W16" value="2018-W15">

There is also the max attribute;).

    
answered by 23.10.2018 в 23:36