Answers for "getting date from input date"

1

set date to input date

var now = new Date();
var day = ("0" + now.getDate()).slice(-2);
var month = ("0" + (now.getMonth() + 1)).slice(-2);
var today = now.getFullYear() + "-" + month + "-" + day;
Posted by: Guest on September-26-2021
0

html date input

<label for="start">Start date:</label>

<input type="date" id="start" name="trip-start"
       value="2018-07-22"
       min="2018-01-01" max="2018-12-31">
Posted by: Guest on May-08-2021

Code answers related to "getting date from input date"

Browse Popular Code Answers by Language