Paul-DS / bootstrap-year-calendar

[DEPRECATED] A fully customizable year calendar widget, for boostrap !
Apache License 2.0
294 stars 243 forks source link

Date Format Change #223

Closed TTR11 closed 5 years ago

TTR11 commented 5 years ago

Hello, Thank you for the awesome project I would like to know how i can change the default date format for the calendar, the format i would prefer is dd/mm/yyyy I tried alot of different ways of doing it, but with no success. Can anyone direct me to the correct way?

( i have solved the issue with:
var startDate = $('#event-modal input[name="event-start-date"]').datepicker('getDate'); var endDate = $('#event-modal input[name="event-end-date"]').datepicker('getDate');

        var d = new Date(startDate)
        var enDate = $.datepicker.formatDate('yy-mm-dd', d);

        var d2 = new Date(endDate)
        var stDate = $.datepicker.formatDate('yy-mm-dd', d);

Just in case anyone needs help :))