javascript - jQuery Date format invalid -


why shows different date 05/05/1972 instead of 29/05/1970?

$(document).ready(function(){     alert($.datepicker.formatdate('dd/mm/yy', new date("29/05/1970"))); }); 

jsfiddle

try this...

$(document).ready(function(){    alert($.datepicker.formatdate('dd/mm/yy', new date(1970, 5, 29)));  });


Comments

Popular posts from this blog

javascript - IndexedDB error: Uncaught DataCloneError: Failed to execute 'put' on 'IDBObjectStore': An object could not be cloned -

amazon web services - When using Cognito credentials with AWS in a browser (javascript), keep getting "missing credentials" error -

c# - How to set the datatextfield value instead of the value on a drop down list? -