Skip to content

Commit 53a4094

Browse files
updated fullcalendar and changelog, removed console.log
1 parent af65e7c commit 53a4094

File tree

4 files changed

+26
-10
lines changed

4 files changed

+26
-10
lines changed

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## [8.0.5]
4+
5+
- Updated fullcalendar package to v5.3.0
6+
37
## [8.0.4]
48

59
- Add animation to alert in header

src/pages/dashboard/components/calendar/Calendar.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ class Calendar extends Component {
4848
}
4949

5050
next = () => {
51-
console.log('HEHEHE');
52-
console.log(this.state.selectedMonthEvents, this.state.selectedMonth.add(1, "month"));
53-
console.log('HEHEHE');
5451
this.setState({
5552
selectedMonth: this.state.selectedMonth.add(1, "month")
5653
});

src/pages/extra/calendar/Calendar.js

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ import moment from 'moment/moment';
1616
import s from './Calendar.module.scss';
1717
import Widget from '../../../components/Widget';
1818

19-
import FullCalendar from "@fullcalendar/react";
20-
import dayGridPlugin from "@fullcalendar/daygrid";
21-
import timeGridPlugin from "@fullcalendar/timegrid";
22-
import interactionPlugin, {Draggable} from "@fullcalendar/interaction";
19+
import FullCalendar from '@fullcalendar/react';
20+
import dayGridPlugin from '@fullcalendar/daygrid';
21+
import timeGridPlugin from '@fullcalendar/timegrid';
22+
import listPlugin from '@fullcalendar/list';
23+
import interactionPlugin, {Draggable} from '@fullcalendar/interaction';
2324

24-
import "@fullcalendar/daygrid/main.css";
25-
import "@fullcalendar/timegrid/main.css";
25+
import '@fullcalendar/daygrid/main.css';
26+
import '@fullcalendar/timegrid/main.css';
2627

2728
class Calendar extends React.Component {
2829
constructor(props) {
@@ -115,7 +116,7 @@ class Calendar extends React.Component {
115116
editable: true,
116117
droppable: true,
117118
},
118-
calendarPlugins: [dayGridPlugin, timeGridPlugin, interactionPlugin],
119+
calendarPlugins: [dayGridPlugin, timeGridPlugin, interactionPlugin, listPlugin],
119120
dragOptions: { zIndex: 999, revert: true, revertDuration: 0 },
120121
}
121122
}
@@ -166,6 +167,7 @@ class Calendar extends React.Component {
166167
this.fullCalendar.getApi().today();
167168
}
168169
changeView = (view) => {
170+
this.setState({ calendarView: view });
169171
this.fullCalendar.getApi().changeView(view);
170172
}
171173
getFormattedDate = (date) => {
@@ -262,6 +264,10 @@ class Calendar extends React.Component {
262264
color="default" onClick={() => this.changeView('timeGridDay')}
263265
active={this.state.calendarView === 'timeGridDay'}
264266
>Day</Button>
267+
<Button
268+
color="default" onClick={() => this.changeView('list')}
269+
active={this.state.calendarView === 'list'}
270+
>List</Button>
265271
</ButtonGroup>
266272
</Col>
267273
</Row>

src/pages/extra/calendar/Calendar.module.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@
2020
padding: 0;
2121
}
2222

23+
.fc .fc-list-sticky .fc-list-day > * {
24+
background: $gray-900;
25+
}
26+
27+
.fc .fc-list-event:hover td {
28+
background-color: $violet_deep;
29+
cursor: pointer;
30+
}
31+
2332
.fc-event {
2433
border: none;
2534
font-weight: $font-weight-normal;

0 commit comments

Comments
 (0)