Fix calendar issues

This commit is contained in:
yflory 2022-11-02 14:58:29 +01:00
parent 1d062c98f2
commit acd7d9654d
3 changed files with 6 additions and 5 deletions

View File

@ -124,7 +124,6 @@ define([
};
var getDateLanguage = function () {
console.error(Messages._languageUsed);
try {
new Date().toLocaleDateString(Messages._languageUsed, { weekday: 'long' });
return Messages._languageUsed;

View File

@ -21,10 +21,12 @@ define([
meta.calendarOpts = Utils.Hash.decodeDataOptions(parsed.hashData.newPadOpts);
}
}
meta.calendarHash = Boolean(window.location.hash);
meta.calendarHash = hash;
};
SFCommonO.start({
addData: addData,
hash: hash,
href: href,
noRealtime: true,
cache: true,
});

View File

@ -913,14 +913,14 @@ define([
cleanKeys(update.one);
}
if (changes.start && (!type.which || type.which === "all")) {
if (changes.start && update && (!type.which || type.which === "all")) {
var diff = changes.start - ev.start;
var newOne = {};
var newFrom = {};
Object.keys(update.one).forEach(function (time) {
Object.keys(update.one || {}).forEach(function (time) {
newOne[Number(time)+diff] = update.one[time];
});
Object.keys(update.from).forEach(function (time) {
Object.keys(update.from || {}).forEach(function (time) {
newFrom[Number(time)+diff] = update.from[time];
});
update.one = newOne;