smalot / bootstrap-datetimepicker

Both Date and Time picker widget based on twitter bootstrap (supports Bootstrap v2 and v3)
http://www.malot.fr/bootstrap-datetimepicker/
Apache License 2.0
3.49k stars 1.65k forks source link

Missing daysMin option in formatDate function #710

Open basepack opened 6 years ago

basepack commented 6 years ago

Hi,

I wanted to show a date like this: Mo 12/11/2017. However that seems not possible when I inspect the formatDate() function.

This row is never to be called:

var dates = $.fn.datetimepicker.dates = {
/**/
daysMin:     ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su'],
/**/   
}

daysShort on the other hand is possible:

formatDate:       function (date, format, language, type, timezone) {
/**/   
          D:    dates[language].daysShort[date.getUTCDay()],
/**/   
}

Maybe it is an idea to add daysMin to the options in formatDate()?