The Grappelli default datepicker
comes with Sunday as the first day of the week. This is really irritating! I want Monday to be the first day of the week for all my present and future models.
Is there a way to do this?
So far, the only "solution" I found involved changing the models' Media class. However, this solution does not seem to work as is with the following:
class Monkey(ImportExportActionModelAdmin):
class Media:
js = ("static/i18n/ui.datepicker-en-GB.js")
...
Where static/i18n/ui.datepicker-en-GB.js
is
(function($) {
// datepicker, timepicker init
grappelli.initDateAndTimePicker = function() {
var options = {
closeText: "Done",
prevText: "Prev",
nextText: "Next",
currentText: "Today",
monthNames: [ "January","February","March","April","May","June",
"July","August","September","October","November","December" ],
monthNamesShort: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ],
dayNames: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ],
dayNamesShort: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ],
dayNamesMin: [ "Su","Mo","Tu","We","Th","Fr","Sa" ],
weekHeader: "Wk",
dateFormat: "dd/mm/yy",
firstDay: 1,
isRTL: false,
showMonthAfterYear: false,
yearSuffix: ""
};
} )(grp.jQuery);
In any case, this solution is sub-optimal as any new model using a date would have to have the same Meta class defined.