Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

set value input date javascript

var date = new Date();
var currentDate = date.toISOString().substring(0,10);
var currentTime = date.toISOString().substring(11,16);

document.getElementById('currentDate').value = currentDate;
document.getElementById('currentTime').value = currentTime;
Comment

set date input html using js

document.getElementById("datePicker").valueAsDate = new Date()
Comment

set date to input date js

var date =  new Date();
var currentDate = date.toISOString().substring(0,10);
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 :: useeffect hook react 
Javascript :: js get id value 
Javascript :: innerhtml replace javascript 
Javascript :: react-router-dom navlink active 
Javascript :: .call javascript 
Javascript :: remove from object javascript 
Javascript :: split sentence in array js 
Javascript :: leaflet center map 
Javascript :: check value exist in array javascript 
Javascript :: jquery on click fade out element 
Javascript :: invisible character javascript 
Javascript :: jquery closert 
Javascript :: installe datatable to reactjs project 
Javascript :: javascript create range with a loop 
Javascript :: sweetalert close on custom button click 
Javascript :: javascript text word wrap replace 
Javascript :: js input type range get value on select 
Javascript :: javascript pass object by value 
Javascript :: react native slow performance after load iamges 
Javascript :: convert nodes to array javascript 
Javascript :: react-native android build apk 
Javascript :: javascript integer to string 
Javascript :: loop every 5 seconds 
Javascript :: jquery growl cdn 
Javascript :: While loop factorial function in javascript 
Javascript :: remove a object name from spread operator 
Javascript :: what 1hr in milliseconds in javascript 
Javascript :: DragDropContext 
Javascript :: url regex javascript 
Javascript :: createrouter vue 3 history remove Hash 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =