Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

set date to input date js

var date =  new Date();
var currentDate = date.toISOString().substring(0,10);
Comment

how assign custom date to input type date in javascript


<input id="dob" type="date" value="<?php echo date("Y-m-d"); ?>">
document.getElementById("dob").value = "2021-02-09";
Comment

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;
Comment

PREVIOUS NEXT
Code Example
Javascript :: axios post request with authorization header and body 
Javascript :: post request with headers 
Javascript :: javascript super 
Javascript :: get key for value javascript 
Javascript :: Date toLocaleDateString Javascript 
Javascript :: how can we open page on new tab in angular or js or typescript 
Javascript :: javascript string proper case 
Javascript :: how to convert string to alternate case in javascript 
Javascript :: change cwd node 
Javascript :: javascript static variable in class 
Javascript :: js create object with keys 
Javascript :: javascript array read object value in array 
Javascript :: setinterval in react 
Javascript :: incoroporate js and css file in html 
Javascript :: prepend option on 2nd index jquery 
Javascript :: get id value jquery 
Javascript :: capitalize name function javascript 
Javascript :: how to change list item text color in react 
Javascript :: Prevent default event behavior 
Javascript :: react js alert popup example 
Javascript :: sum index of an array javascript 
Javascript :: vue js count down timer 
Javascript :: agregar atributo con id jquery 
Javascript :: express.js get params 
Javascript :: Not Found The requested URL was not found on this server angular routing when going back to site from ecternal source 
Javascript :: change terminal shortcut vscode 
Javascript :: js replace diacritics 
Javascript :: scroll for sticky 
Javascript :: array destructuring in react 
Javascript :: jquery selectors attribute ends with 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =