Answers for "set input date to select date initail"

0

set input date to select date initail

Like any HTML input field, the browser will leave the date element empty unless a default value is specified within the value attribute. Unfortunately, HTML5 doesn't provide a way of specifying 'today' in the HTMLInputElement.prototype.value.

One must instead explicitly provide a RFC3339 formatted date (YYYY-MM-DD). For example:

element.value = "2011-09-29"
Posted by: Guest on August-27-2021

Browse Popular Code Answers by Language