jquery datepicker date format
jQuery UI DatePicker - Change Date Format
$("#datepicker").datepicker().datepicker("setDate", "0"); $("#format").change(function () { var fromatVal = $(this).val(); $('#formatVal').html(fromatVal); $("#datepicker").datepicker("option", "dateFormat", fromatVal); });DEMO
Format | Description | Example |
d | The day of the month between 1 and 31. | "1" to "31" |
dd | The day of the month with leading zero if required. | "01" to "31" |
D | Abbreviated day name. Date.CultureInfo.abbreviatedDayNames. | "Mon" to "Sun" |
DD | The full day name. Date.CultureInfo.dayNames. | "Monday" to "Sunday" |
m | The month of the year between 1-12. | "1" to "12" |
mm | The month of the year with leading zero if required. | "01" to "12" |
M | Abbreviated month name. Date.CultureInfo.abbreviatedMonthNames. | "Jan" to "Dec" |
MM | The full month name. Date.CultureInfo.monthNames. | "January" to "December" |
y | Displays the year as a two-digit number. | "99" or "07" |
yy | Displays the full four digit year. | "1999" or "2007" |
jquery datepicker date format
Reviewed by Bhaumik Patel
on
8:16 PM
Rating: