PHP Pass 2 Nilai Tanggal ke 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;
	}
Vivacious Vendace