mirror of
https://github.com/wassname/fullcalendar.git
synced 2026-06-27 16:10:13 +08:00
fixed regression where weekNumberCalculation as a function wouldn't work
This commit is contained in:
+6
-5
@@ -146,15 +146,16 @@ function Calendar(element, instanceOptions) {
|
||||
// `weekNumberCalculation` setting.
|
||||
t.calculateWeekNumber = function(mom) {
|
||||
var calc = options.weekNumberCalculation;
|
||||
if (calc == 'local') {
|
||||
|
||||
if (typeof calc === 'function') {
|
||||
return calc(mom);
|
||||
}
|
||||
else if (calc === 'local') {
|
||||
return mom.week();
|
||||
}
|
||||
else if (calc.toUpperCase() == 'ISO') {
|
||||
else if (calc.toUpperCase() === 'ISO') {
|
||||
return mom.isoWeek();
|
||||
}
|
||||
else if (typeof calc === 'function') {
|
||||
return calc(mom);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user