I’m processing a creditcard swipe and retrieving the data and display it on my input fields. I have three actually. Cardnumber, expiration date and name on card.
I was able to display the data of cardnumber and name by using this
$("#cardnumber").val( result.cardnumber );
$("#name").val( result.name );
My question is how would i do it on a input field which type is set to month?
i tried this but doesn’t work $("#expdate").val( result.date ) the data for the expiration date is in the format of YY/MM or 12/08
UPDATE:
sorry the data for the date i’m receiving is in this format 1208 instead of 12/08
HTML
<input type="month" id="expDate" value="" />
From you post it seems
should be
Its a typos.
According to edit
if you date is always in format
ddmmthen following will work: