Skip to content

Commit 6095060

Browse files
committed
chore: updates regarding review
use correct color scheme for views use blue scheme from existing demos apply fallback color if none specified when toggling daylight remove default.scss apply currentColor to links within cal-event-title
1 parent 100f939 commit 6095060

File tree

7 files changed

+20
-15
lines changed

7 files changed

+20
-15
lines changed

demos/demo-modules/exclude-days/component.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ export class DemoComponent {
2828
{
2929
start: new Date('2016-01-01'),
3030
end: new Date('2016-01-09'),
31-
title: 'Multiple weeks event',
32-
color: colors.blue
31+
title: 'Multiple weeks event'
3332
}
3433
];
3534

src/angular-calendar.scss

-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@
22
@import './modules/week/calendar-week-view';
33
@import './modules/day/calendar-day-view';
44
@import './modules/common/calendar-tooltip';
5-
@import './defaults';

src/defaults.scss

-6
This file was deleted.

src/modules/day/calendar-day-view.scss

+7-1
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,20 @@
4848
}
4949

5050
.cal-event {
51-
border: solid 1px;
5251
padding: 5px;
5352
font-size: 12px;
5453
overflow: hidden;
5554
text-overflow: ellipsis;
5655
white-space: nowrap;
5756
height: 100%;
5857
box-sizing: border-box;
58+
background-color: #D1E8FF;
59+
border: 1px solid #1e90ff;
60+
color: #1e90ff;
61+
}
62+
63+
.cal-event-title:link {
64+
color: currentColor;
5965
}
6066

6167
.cal-draggable {

src/modules/month/calendar-month-view.component.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,8 @@ export class CalendarMonthViewComponent
312312
toggleDayHighlight(event: CalendarEvent, isHighlighted: boolean): void {
313313
this.view.days.forEach(day => {
314314
if (isHighlighted && day.events.indexOf(event) > -1) {
315-
day.backgroundColor = event.color.secondary;
315+
day.backgroundColor =
316+
(event.color && event.color.secondary) || '#D1E8FF';
316317
} else {
317318
delete day.backgroundColor;
318319
}

src/modules/month/calendar-month-view.scss

+3-4
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@
9797
border-radius: 50%;
9898
display: inline-block;
9999
margin: 2px;
100+
background-color: #1e90ff;
101+
border-color: #D1E8FF;
102+
color: #fff;
100103
}
101104

102105
.cal-day-cell.cal-in-month.cal-has-events {
@@ -136,10 +139,6 @@
136139
top: 2px;
137140
}
138141

139-
.cal-event-title {
140-
color: white;
141-
}
142-
143142
.cal-out-month {
144143
.cal-day-badge,
145144
.cal-event {

src/modules/week/calendar-week-view.scss

+7
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@
4444
margin-right: 2px;
4545
height: 30px;
4646
line-height: 30px;
47+
background-color: #D1E8FF;
48+
border: 1px solid #1e90ff;
49+
color: #1e90ff;
50+
}
51+
52+
.cal-event-title:link {
53+
color: currentColor;
4754
}
4855

4956
.cal-draggable {

0 commit comments

Comments
 (0)