Bootstrap Datepicker format is ignored (bootstrap-datepicker)

Well, sometimes the way they tell you how to do it, is wrong…

You make a nifty date picker, using the bootstrap-datepicker.js and you call the datepicker via javascript, something like this:

$('.datepicker').datepicker()

You end up having dates in “mm-dd-yy” format.

To change this to “dd-mm-yy” format, you should do it like this:

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

I suggest the nice people at eyecon.ro have some fixing to do. 😉 Cause they tell you to use format:… , which doesn’t work.

Leave a Comment