I found an example at w3schools, where you can enter a date with given max and min attributes.
If I enter a date outside of the specified range and submit it, I see:
It says: "value must be 31-12-1979 or earlier"
Now I believe that this works because the <input type="submit"> is the way to submit this form here.
However, how can I show the same error/validation message if instead of <input type="submit"> I use <button id="bool-submit">Submit</button>?
