How can I add st,nd,rd,th to date format.. i.e. November 19th, or December 2nd, etc.
Currently, I have following code
$( \"#datepicker\" ).datepi
dateFormat doesn't use "s" as a format type, so in the options I usually add -
dateFormat : "DD ds MM, yy",
onSelect: function(dateText, inst) {
var arrOrd = new Array('0','st','nd','rd','th','th','th','th','th','th','th','th','th','th','th','th','th','th','th','th','th','st','nd','rd','th','th','th','th','th','th','th','st');
var day = Number(inst.selectedDay);
var suffix = arrOrd[day];
$(this).val($(this).val().replace(inst.selectedDay+"s",inst.selectedDay+suffix));
}