muneebShabbir muneebShabbir - 2 years ago 161
jQuery Question

Setting format and value in input type="date"

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
. how can i get what will be the format of this field?

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

Answer Source

The format is YYYY-MM-DD. You cannot change it.

$('#myinput').val('2013-12-31'); sets value

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download