I am using jQuery datepicker plugin. I should get the date value displayed when the user selects a date from the calender. I use getDate() method as given in the documentation. However, I wan't the output to be in a different format then what I am getting right now. You ll understand when you see the code.  
JavaScript
 $("#dealpickerEnd").datepicker({
    inline: true,
    showOtherMonths: true,
    firstDay: 1,
    dayNamesMin: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
    onSelect: function() {
        var deal = document.getElementById("dealDateAfter");
        var currentDate = $("#dealpickerEnd").datepicker("getDate");
        deal.innerHTML = currentDate;
    }
 });  
Output
Fri Dec 26 2014 00:00:00 GMT+0530 (IST)
Intended Output
26-Dec-2014
Is this possible?
 
     
    