I\'m working with HTML5 elements on my webpage. By default input type=\"date\"
shows date as YYYY-MM-DD
.
The question is, is it possible t
Since the post is active 2 Months ago. so I thought to give my input as well.
In my case i recieve date from a card reader which comes in dd/mm/yyyy format.
what i do. E.g.
var d="16/09/2019" // date received from card
function filldate(){
document.getElementById('cardexpirydate').value=d.split('/').reverse().join("-");
}
what the code do:
All this is done in a single line.
i thought this will help some one so i wrote this.