-3
this.locale = {
        direction: 'ltr',
        format: moment.localeData().longDateFormat('L'),
        separator: ' - ',
        applyLabel: 'Apply',
        cancelLabel: 'Cancel',
        weekLabel: 'W',
        customRangeLabel: 'Custom Range',
        daysOfWeek: moment.weekdaysMin(),
        monthNames: moment.monthsShort(),
        firstDay: moment.localeData().firstDayOfWeek()
    };

Now date format is MM/DD/YYYY .how to change the date format to DD-MM-YYYY

Harsh Shah
  • 15
  • 3

1 Answers1

0

Use Datepicker's dateFormat option:

$( ".selector" ).datepicker({
  dateFormat: "dd-mm-yy"
});

More usage instructions and a link to all different formatting options can be found here: http://api.jqueryui.com/datepicker/#option-dateFormat

Raptord
  • 503
  • 3
  • 8