Online HTML Editor

<!DOCTYPE html> <html> <head> <title>Input Week min</title> <style> form { width:70%; margin: 0 auto; text-align: center; } * { padding: 2px; margin:5px; } input[type="button"] { border-radius: 10px; } </style> </head> <body> <form> <fieldset> <legend>Week-min</legend> <label for="WeekSelect">Vacation Week: <input type="week" id="WeekSelect" value="2019-W45" min="2020-W05"> </label> <input type="button" onclick="getMinimum()" value="Go on a vacation"> <div id="divDisplay"></div> </fieldset> </form> <script> var divDisplay = document.getElementById("divDisplay"); var inputWeek = document.getElementById("WeekSelect"); function getMinimum() { divDisplay.textContent = 'You can go on a vacation after: Week: '+inputWeek.min.split("-W") [1]+' ,'+inputWeek.min.split("-W")[0] } </script> </body> </html>