Not able to get "today Date value to "max" attribute of input field", but able to fetch the value in the console.
Would you guys help me how to get value in the input field (i.e max="2018-08-21")
var todayDate =
new Date().getFullYear() +
"-" +
("0" + (new Date().getMonth() + 1)).slice(-2) +
"-" +
("0" + new Date().getDate()).slice(-2);
console.log(todayDate, "here");
<div class="input-group">
<input type="date" max="todayDate" />
</div>
momentjswhen you work with dates.