I want to set the today's date to the DateTime control of sharepoint. My code is:
$(document).ready(function () {
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth()+1; //January is 0!
var yyyy = today.getFullYear();
if(dd<10){dd='0'+dd} if(mm<10){mm='0'+mm} var today = dd+'/'+mm+'/'+yyyy;
var today= mm+'/'+dd+'/'+yyyy;
$( "td.ms-dtinput > input[id$='DateTimeFieldDate']" ).val= today;
});
But I am not getting the value inserted in the DateTime conrol's text box. What am I missing?