Skip to content

Commit af65e7c

Browse files
updated fullcalendar
1 parent bf5e7b1 commit af65e7c

File tree

5 files changed

+92
-49
lines changed

5 files changed

+92
-49
lines changed

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,12 @@
5656
"dependencies": {
5757
"@amcharts/amcharts4": "^4.9.28",
5858
"@amcharts/amcharts4-geodata": "^4.1.16",
59-
"@fullcalendar/core": "^4.3.1",
60-
"@fullcalendar/daygrid": "^4.3.0",
61-
"@fullcalendar/interaction": "^4.3.0",
62-
"@fullcalendar/react": "^4.3.0",
63-
"@fullcalendar/timegrid": "^4.3.0",
59+
"@fullcalendar/core": "5.3.0",
60+
"@fullcalendar/daygrid": "5.3.0",
61+
"@fullcalendar/interaction": "5.3.0",
62+
"@fullcalendar/list": "5.3.0",
63+
"@fullcalendar/react": "5.3.0",
64+
"@fullcalendar/timegrid": "5.3.0",
6465
"animate.css": "4.1.0",
6566
"apexcharts": "^3.19.3",
6667
"awesome-bootstrap-checkbox": "1.0.1",

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ 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');
5154
this.setState({
5255
selectedMonth: this.state.selectedMonth.add(1, "month")
5356
});
@@ -61,9 +64,6 @@ class Calendar extends Component {
6164
);
6265
}
6366

64-
65-
66-
6767
renderWeeks = () => {
6868
const currentMonthView = this.state.selectedMonth;
6969
const currentSelectedDay = this.state.selectedDay;
@@ -95,7 +95,6 @@ class Calendar extends Component {
9595
return weeks;
9696
}
9797

98-
9998
render() {
10099

101100
return (

src/pages/extra/calendar/Calendar.js

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,9 @@ import dayGridPlugin from "@fullcalendar/daygrid";
2121
import timeGridPlugin from "@fullcalendar/timegrid";
2222
import interactionPlugin, {Draggable} from "@fullcalendar/interaction";
2323

24-
import "@fullcalendar/core/main.css";
2524
import "@fullcalendar/daygrid/main.css";
2625
import "@fullcalendar/timegrid/main.css";
2726

28-
29-
3027
class Calendar extends React.Component {
3128
constructor(props) {
3229
super(props)
@@ -42,24 +39,24 @@ class Calendar extends React.Component {
4239
currentMonth: moment().format('MMM YYYY'),
4340
currentDay: moment().format('dddd'),
4441
calendarOptions: {
45-
header: {
42+
headerToolbar: {
4643
left: '',
47-
center: '',
48-
right: '',
44+
center: 'title',
45+
right: ''
4946
},
5047
events: [
5148
{
5249
title: 'All Day Event',
5350
start: new Date(y, m, 1),
54-
backgroundColor: '#F45722',
51+
color: '#F45722',
5552
textColor: '#fff',
5653
description: 'Will be busy throughout the whole day',
5754
},
5855
{
5956
title: 'Long Event',
6057
start: new Date(y, m, d + 5),
6158
end: new Date(y, m, d + 7),
62-
backgroundColor: '#58D777',
59+
color: '#58D777',
6360
textColor: '#f4f4f5',
6461
description: 'This conference should be worse visiting',
6562
},
@@ -68,7 +65,7 @@ class Calendar extends React.Component {
6865
title: 'Blah Blah Car',
6966
start: new Date(y, m, d - 3, 16, 0),
7067
allDay: false,
71-
backgroundColor: '#f0af03',
68+
color: '#f0af03',
7269
textColor: '#f4f4f5',
7370
description: 'Agree with this guy on arrival time',
7471
},
@@ -77,23 +74,23 @@ class Calendar extends React.Component {
7774
title: 'Buy this template',
7875
start: new Date(y, m, d + 3, 12, 0),
7976
allDay: false,
80-
backgroundColor: '#4ebfbb',
77+
color: '#4ebfbb',
8178
textColor: '#f4f4f5',
8279
description: 'Make sure everything is consistent first',
8380
},
8481
{
8582
title: 'Got to school',
8683
start: new Date(y, m, d + 16, 12, 0),
8784
end: new Date(y, m, d + 16, 13, 0),
88-
backgroundColor: '#64bd63',
85+
color: '#64bd63',
8986
textColor: '#fff',
9087
description: 'Time to go back',
9188
},
9289
{
9390
title: 'Study some Node',
9491
start: new Date(y, m, d + 18, 12, 0),
9592
end: new Date(y, m, d + 18, 13, 0),
96-
backgroundColor: '#79A5F0',
93+
color: '#79A5F0',
9794
textColor: '#fff',
9895
description: 'Node.js is a platform built '
9996
+ 'on Chrome\'s JavaScript runtime for easily'

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@
2323
.fc-event {
2424
border: none;
2525
font-weight: $font-weight-normal;
26-
background-color: $gray-200;
26+
border: 1px solid $text-color;
2727
color: $text-color;
28+
margin-left: 0!important;
2829
}
2930

3031
.fc .fc-today {

yarn.lock

Lines changed: 72 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,35 +1257,70 @@
12571257
resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz#8eed982e2ee6f7f4e44c253e12962980791efd46"
12581258
integrity sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA==
12591259

1260-
"@fullcalendar/core@^4.3.1", "@fullcalendar/core@~4.4.0":
1261-
version "4.4.2"
1262-
resolved "https://registry.yarnpkg.com/@fullcalendar/core/-/core-4.4.2.tgz#864abe98cce4497a163c01a8fc30389f15d3d4e1"
1263-
integrity sha512-vq7KQGuAJ1ieFG5tUqwxwUwmXYtblFOTjHaLAVHo6iEPB52mS7DS45VJfkhaQmX4+5/+BHRpg82G1qkuAINwtg==
1264-
1265-
"@fullcalendar/daygrid@^4.3.0", "@fullcalendar/daygrid@~4.4.0":
1266-
version "4.4.2"
1267-
resolved "https://registry.yarnpkg.com/@fullcalendar/daygrid/-/daygrid-4.4.2.tgz#568bfb3c7cc97f83b57cf3aef0fa3ed1bf6eda16"
1268-
integrity sha512-axjfMhxEXHShV3r2TZjf+2niJ1C6LdAxkHKmg7mVq4jXtUQHOldU5XsjV0v2lUAt1urJBFi2zajfK8798ukL3Q==
1269-
1270-
"@fullcalendar/interaction@^4.3.0":
1271-
version "4.4.2"
1272-
resolved "https://registry.yarnpkg.com/@fullcalendar/interaction/-/interaction-4.4.2.tgz#0a6be06538f843b6f0f4e9b4de87a5e3ec3629fb"
1273-
integrity sha512-3ItpGFnxcYQT4NClqhq93QTQwOI8x3mlMf5M4DgK5avVaSzpv9g8p+opqeotK2yzpFeINps06cuQyB1h7vcv1Q==
1274-
1275-
"@fullcalendar/react@^4.3.0":
1276-
version "4.4.2"
1277-
resolved "https://registry.yarnpkg.com/@fullcalendar/react/-/react-4.4.2.tgz#f98264d72b38272a1f4a318bd745628ea754d8be"
1278-
integrity sha512-CObyC53Ph2wer83XOm2ae7gEDP5YuENbycetnKgXPLrUVx94hxJGo+G8lZFI4LeUG1nkecfNCpazoa3+x0yKsQ==
1279-
dependencies:
1280-
"@fullcalendar/core" "~4.4.0"
1281-
fast-deep-equal "^2.0.1"
1260+
"@fullcalendar/common@~5.3.0", "@fullcalendar/common@~5.3.1":
1261+
version "5.3.1"
1262+
resolved "https://registry.yarnpkg.com/@fullcalendar/common/-/common-5.3.1.tgz#9193032cf88f12ebcd8337ef6e98b23fbbbf04ca"
1263+
integrity sha512-2PREEpiFQSDN5MNdoD/OkpJ+d7FPtN2TwTJMsuq3fTjmj3nM+utrxBmUr9a2F6WWW1X+xGU5nHQA52vhqIiQOQ==
1264+
dependencies:
1265+
tslib "^2.0.0"
1266+
1267+
"@fullcalendar/core@5.3.0":
1268+
version "5.3.0"
1269+
resolved "https://registry.yarnpkg.com/@fullcalendar/core/-/core-5.3.0.tgz#4888994e9ec9f20203c724787f5161c6afe00d15"
1270+
integrity sha512-blA6r4dFKRyFxB3tiG8eeF2kl75rep8aavYZGpALGZEfPLf/T3xqPf4ulgYZ5bojsUXS9FQM0NqFM9jD/XSnOg==
1271+
dependencies:
1272+
"@fullcalendar/common" "~5.3.0"
1273+
preact "^10.0.5"
1274+
tslib "^2.0.0"
1275+
1276+
"@fullcalendar/daygrid@5.3.0":
1277+
version "5.3.0"
1278+
resolved "https://registry.yarnpkg.com/@fullcalendar/daygrid/-/daygrid-5.3.0.tgz#d3107a32c4f9c3e1a4bb7084f5fc310b1f92a2d0"
1279+
integrity sha512-YDE7Pnxf+jkkQjogYPEgHDn4mahgUl2eNJRSytQOBJDVrsWcR/nAXI0PhsWHKi86BZVviEiEjzuLv+e4jeIVCg==
1280+
dependencies:
1281+
"@fullcalendar/common" "~5.3.0"
1282+
tslib "^2.0.0"
1283+
1284+
"@fullcalendar/daygrid@~5.3.0":
1285+
version "5.3.2"
1286+
resolved "https://registry.yarnpkg.com/@fullcalendar/daygrid/-/daygrid-5.3.2.tgz#c12160fb76729f13dc423c0db12664969ef01af0"
1287+
integrity sha512-BK+YIecF3q9d/+6lAnf6WiJEEs7Wpa/mu9gXpkEf8vn4nl2bicPHUwykg5dUMCBy7ADAkDoL7VuBVi0XBRtPYw==
1288+
dependencies:
1289+
"@fullcalendar/common" "~5.3.1"
1290+
tslib "^2.0.0"
1291+
1292+
"@fullcalendar/interaction@5.3.0":
1293+
version "5.3.0"
1294+
resolved "https://registry.yarnpkg.com/@fullcalendar/interaction/-/interaction-5.3.0.tgz#f63621b56463a6c3ee462f115d197a6bb6fbeb04"
1295+
integrity sha512-ls1OlE55axFUEVHdk3k+gRThx6dvOtk7XKTYHCy1nQmKafWhvW8wuf8v8Pa5uUAndRkNVZZNfbha842P4zb+NA==
1296+
dependencies:
1297+
"@fullcalendar/common" "~5.3.0"
1298+
tslib "^2.0.0"
1299+
1300+
"@fullcalendar/list@5.3.0":
1301+
version "5.3.0"
1302+
resolved "https://registry.yarnpkg.com/@fullcalendar/list/-/list-5.3.0.tgz#afd9b96a6e22075eaf9d99d1aa79c4c54b03ed5a"
1303+
integrity sha512-nU9h5hTyVpoAL5w/ifrbqU4e4F8sc5YZRXQz5X0dHcS334IRVARTBc7He79cKhrwBy7yrTZ4RatY5Nd+NUi8pw==
1304+
dependencies:
1305+
"@fullcalendar/common" "~5.3.0"
1306+
tslib "^2.0.0"
1307+
1308+
"@fullcalendar/react@5.3.0":
1309+
version "5.3.0"
1310+
resolved "https://registry.yarnpkg.com/@fullcalendar/react/-/react-5.3.0.tgz#0d6958b2b0cd5453cb19dd726248d097be36bfa2"
1311+
integrity sha512-mRvU15dqDH29GGGx+JOFEGV7ZXkj+K+gg9aIiLC78geXPH3878OKw56EmNcr5mDXJDjHb5ma47ZqIfQUyTZqiQ==
1312+
dependencies:
1313+
"@fullcalendar/common" "~5.3.0"
1314+
tslib "^2.0.0"
12821315

1283-
"@fullcalendar/timegrid@^4.3.0":
1284-
version "4.4.2"
1285-
resolved "https://registry.yarnpkg.com/@fullcalendar/timegrid/-/timegrid-4.4.2.tgz#9d5b26204cd2b0928e7498c54f758a6d07b15191"
1286-
integrity sha512-M5an7qii8OUmI4ogY47k5pn2j/qUbLp6sa6Vo0gO182HR5pb9YtrEZnoQhnScok+I0BkDkLFzMQoiAMTjBm2PQ==
1316+
"@fullcalendar/timegrid@5.3.0":
1317+
version "5.3.0"
1318+
resolved "https://registry.yarnpkg.com/@fullcalendar/timegrid/-/timegrid-5.3.0.tgz#e3dda74fde9ae429326f41f707b60c5082e1cfee"
1319+
integrity sha512-bdlqDcN7A+gRhjOqiKyd++TbMclfea2ipGks5pxUyZj5QAiRiQ6XvA5V8ktouN3dBc03UZ5pkIAvXuEgbFmYMw==
12871320
dependencies:
1288-
"@fullcalendar/daygrid" "~4.4.0"
1321+
"@fullcalendar/common" "~5.3.0"
1322+
"@fullcalendar/daygrid" "~5.3.0"
1323+
tslib "^2.0.0"
12891324

12901325
"@hapi/address@2.x.x":
12911326
version "2.1.4"
@@ -9776,6 +9811,11 @@ postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.17, postcss@^7.0.2
97769811
source-map "^0.6.1"
97779812
supports-color "^6.1.0"
97789813

9814+
preact@^10.0.5:
9815+
version "10.4.8"
9816+
resolved "https://registry.yarnpkg.com/preact/-/preact-10.4.8.tgz#8517b106cc5591eb675237c93da99ac052cf4756"
9817+
integrity sha512-uVLeEAyRsCkUEFhVHlOu17OxcrwC7+hTGZ08kBoLBiGHiZooUZuibQnphgMKftw/rqYntNMyhVCPqQhcyAGHag==
9818+
97799819
prelude-ls@~1.1.2:
97809820
version "1.1.2"
97819821
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
@@ -12550,6 +12590,11 @@ tslib@^1.9.0, tslib@^1.9.3:
1255012590
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043"
1255112591
integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==
1255212592

12593+
tslib@^2.0.0:
12594+
version "2.0.1"
12595+
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.1.tgz#410eb0d113e5b6356490eec749603725b021b43e"
12596+
integrity sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==
12597+
1255312598
tty-browserify@0.0.0:
1255412599
version "0.0.0"
1255512600
resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6"

0 commit comments

Comments
 (0)