Is there any way to set the format of <input type="date" />
? if no then how can i set date in this field using JavaScript in the default format of type="date"
. how can i get what will be the format of this field?
EDIT : Actually i want to show native date-picker of mobile device that's why i picked this type of input. if is there any alternate for that field that also will b good to have.
Sorry if i said anything stupid. Please guide me
Right-click the date field, and then click Properties. In the Property Sheet, select the format you want from the Format property list.
The format is YYYY-MM-DD
. You cannot change it.
$('#myinput').val('2013-12-31');
sets value
new Date().toISOString().split('T')[0];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With