fix calendar shade color

This commit is contained in:
yuri
2015-02-17 17:28:58 +02:00
parent ba65ccffe4
commit 3f8ccb69fc
@@ -152,8 +152,9 @@ Espo.define('Crm:Views.Calendar.Calendar', ['View', 'lib!FullCalendar'], functio
fillColor: function (event) {
var color = this.colors[event.scope];
var d = event.end || event.start;
if (d.unix() < this.now.unix()) {
var d = event.dateEnd;
if (d && this.getDateTime().toMoment(d).unix() < this.now.unix()) {
color = this.shadeColor(color, 0.4);
}
event.color = color;
@@ -194,7 +195,8 @@ Espo.define('Crm:Views.Calendar.Calendar', ['View', 'lib!FullCalendar'], functio
},
convertToFcEvents: function (list) {
this.now = moment().utc();
this.now = moment.tz(this.getDateTime().timeZone);
var events = [];
list.forEach(function (o) {
var event = this.convertToFcEvent(o);