I'm working on an application that will have an input field as DATE.
Which changes daily,
Based on the date the data will be displayed.
I got the solution to my problem in HTML5 Input Type Date -- Default Value to Today? this discussion .
But when i tried to code in intel XDK .its not displaying todays date . Here is the code.
var date = new Date();
var day = date.getDate();
var month = date.getMonth() + 1;
var year = date.getFullYear();
if (month < 10) month = "0" + month;
if (day < 10) day = "0" + day;
var today = year + "-" + month + "-" + day;
document.getElementById("theDate").value = today;
<input type="date" id="theDate">
I have tried same code in my project . But it gives result like
Thanks in advance.....