Get week day name from jquery ui calendar

后端 未结 5 2088
甜味超标
甜味超标 2020-12-21 14:36

I want to get the name of the Day when choosing date from jquery ui calender.

for example, when choosing 14-3-2012 it should returns Wednesday.

$(\"i         


        
5条回答
  •  悲哀的现实
    2020-12-21 14:46

    There are various formats from which you can display the dates.

    Check this for all the date formats compatible with the calendar.

    In your case dateFormat: 'DD' displays the WeekDays.

    $("input[name=date]").datepicker({
        dateFormat: 'DD',
        changeYear:true,
        changeMonth:true,
        onSelect: function(dateText, inst) {
             alert(dateText); // alerts the day name
        }
    });
    

提交回复
热议问题