Skip to content
Advertisement

How to set input field’s max date from current date

JavaScript

I want users to select a date between current date to next 7 days. This input min disables past dates from current date . Now how can I set the max limit next 7 days from current date?

Advertisement

Answer

You can try adding the max attribute to the input but be aware that this can be modified in the browser.

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement