Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php pass 2 date value to javascript

function dateDiff() {
	
	var date1 = new Date(document.getElementById("fromDatePicker").value);
	var date2 = new Date(document.getElementById("toDatePicker").value);
	var difference = date2 - date1;
	var days = difference/(24*3600*1000);
	document.getElementById('hari').value=days;
	}
 
PREVIOUS NEXT
Tagged: #php #pass #date #javascript
ADD COMMENT
Topic
Name
1+6 =