Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/dev This commit looks good Details

This commit is contained in:
Carlos Jimenez Ruiz 2019-09-26 16:09:06 +02:00
commit 641dad2ced
1 changed files with 9 additions and 7 deletions

View File

@ -204,7 +204,7 @@ export default class Calendar extends Component {
return event.dated >= dated && event.dated <= dated;
});
const params = {dated: dated, events: events, style: {}};
const params = {dated: dated, events: events /**/, style: {}};
const isSaturday = dated.getDay() === 6;
const isSunday = dated.getDay() === 0;
const isCurrentMonth = dated.getMonth() === this.currentMonth.getMonth();
@ -290,13 +290,15 @@ export default class Calendar extends Component {
renderStyle(style) {
const normalizedStyle = {};
const properties = Object.keys(style);
properties.forEach(attribute => {
const attrName = attribute.split(/(?=[A-Z])/).
join('-').toLowerCase();
if (style) {
const properties = Object.keys(style);
properties.forEach(attribute => {
const attrName = attribute.split(/(?=[A-Z])/).
join('-').toLowerCase();
normalizedStyle[attrName] = style[attribute];
});
normalizedStyle[attrName] = style[attribute];
});
}
return normalizedStyle;
}