Hello my user can input date like 2/2/2008, but I need it in format 02/02/2008. How do i reformat it with date.js?
I have tried:
document.getElementById("smth").value = Date.parse(smth, "dd/mm/yyyy").toString("dd/mm/yyyy");
while parse works fine, toString outputs 02/00/2008? and if run it again on date 02/00/2008 I get 01/00/2008.
Can anyone point me in right direction?