Skip to content

Commit 7879a3a

Browse files
committed
fixed primefaces#7450 FullCalendar 4.1.0 Support
1 parent d22708f commit 7879a3a

File tree

6 files changed

+62
-34
lines changed

6 files changed

+62
-34
lines changed

angular.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
"src/upload.php"
2525
],
2626
"styles": [
27-
"node_modules/fullcalendar/dist/fullcalendar.min.css",
27+
"node_modules/@fullcalendar/core/main.min.css",
28+
"node_modules/@fullcalendar/daygrid/main.min.css",
29+
"node_modules/@fullcalendar/timegrid/main.min.css",
2830
"node_modules/quill/dist/quill.snow.css",
2931
"node_modules/primeicons/primeicons.css",
3032
"node_modules/primeflex/primeflex.css",
@@ -34,7 +36,10 @@
3436
"scripts": [
3537
"./node_modules/moment/moment.js",
3638
"./node_modules/chart.js/dist/Chart.js",
37-
"./node_modules/fullcalendar/dist/fullcalendar.js",
39+
"./node_modules/@fullcalendar/core/main.js",
40+
"./node_modules/@fullcalendar/daygrid/main.js",
41+
"./node_modules/@fullcalendar/timegrid/main.js",
42+
"./node_modules/@fullcalendar/interaction/main.js",
3843
"./node_modules/quill/dist/quill.js",
3944
"./node_modules/prismjs/prism.js",
4045
"./node_modules/prismjs/components/prism-typescript.js"

package.json

+28-25
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "primeng",
3-
"version": "7.1.0",
3+
"version": "7.1.1-SNAPSHOT",
44
"license": "MIT",
55
"scripts": {
66
"ng": "ng",
@@ -15,43 +15,32 @@
1515
"url": "https://github.com/primefaces/primeng.git"
1616
},
1717
"devDependencies": {
18+
"@angular-devkit/build-angular": "^0.13.7",
1819
"@angular/animations": "~7.1.0",
1920
"@angular/cdk": "~7.1.0",
21+
"@angular/cli": "~7.1.0",
2022
"@angular/common": "~7.1.0",
2123
"@angular/compiler": "~7.1.0",
24+
"@angular/compiler-cli": "^7.2.11",
2225
"@angular/core": "~7.1.0",
2326
"@angular/forms": "~7.1.0",
2427
"@angular/http": "~7.1.0",
28+
"@angular/language-service": "~7.1.0",
2529
"@angular/platform-browser": "~7.1.0",
2630
"@angular/platform-browser-dynamic": "~7.1.0",
2731
"@angular/router": "~7.1.0",
28-
"core-js": "^2.5.4",
29-
"rxjs": "~6.3.3",
30-
"tslib": "^1.9.0",
31-
"zone.js": "~0.8.26",
32-
"@angular-devkit/build-angular": "~0.11.0",
33-
"@angular/cli": "~7.1.0",
34-
"@angular/compiler-cli": "~7.1.0",
35-
"@angular/language-service": "~7.1.0",
36-
"@types/node": "~8.9.4",
32+
"@fullcalendar/core": "4.0.1",
33+
"@fullcalendar/daygrid": "4.0.1",
34+
"@fullcalendar/interaction": "4.0.1",
35+
"@fullcalendar/timegrid": "4.0.1",
3736
"@types/jasmine": "~2.8.8",
3837
"@types/jasminewd2": "~2.0.3",
39-
"codelyzer": "~4.5.0",
40-
"jasmine-core": "~2.99.1",
41-
"jasmine-spec-reporter": "~4.2.1",
42-
"karma": "~3.1.1",
43-
"karma-chrome-launcher": "~2.2.0",
44-
"karma-coverage-istanbul-reporter": "~2.0.1",
45-
"karma-jasmine": "~1.1.2",
46-
"karma-jasmine-html-reporter": "^0.2.2",
47-
"protractor": "~5.4.0",
48-
"ts-node": "~7.0.0",
49-
"tslint": "~5.11.0",
50-
"typescript": "~3.1.6",
38+
"@types/node": "~8.9.4",
5139
"chart.js": "2.7.3",
40+
"codelyzer": "~4.5.0",
41+
"core-js": "^2.5.4",
5242
"del": "3.0.0",
5343
"font-awesome": "4.7.0",
54-
"fullcalendar": "4.0.0-alpha.2",
5544
"gulp": "^3.9.1",
5645
"gulp-concat": "2.6.1",
5746
"gulp-flatten": "^0.4.0",
@@ -60,10 +49,24 @@
6049
"gulp-uglifycss": "1.1.0",
6150
"install": "0.12.2",
6251
"intl": "1.2.5",
52+
"jasmine-core": "~2.99.1",
53+
"jasmine-spec-reporter": "~4.2.1",
54+
"karma": "~3.1.1",
55+
"karma-chrome-launcher": "~2.2.0",
56+
"karma-coverage-istanbul-reporter": "~2.0.1",
57+
"karma-jasmine": "~1.1.2",
58+
"karma-jasmine-html-reporter": "^0.2.2",
59+
"primeflex": "1.0.0-rc.1",
60+
"primeicons": "1.0.0",
6361
"prismjs": "1.15.0",
62+
"protractor": "~5.4.0",
6463
"quill": "1.3.6",
64+
"rxjs": "~6.3.3",
65+
"ts-node": "~7.0.0",
66+
"tslib": "^1.9.0",
67+
"tslint": "~5.11.0",
68+
"typescript": "~3.1.6",
6569
"web-animations-js": "2.3.1",
66-
"primeicons": "1.0.0",
67-
"primeflex": "1.0.0-rc.1"
70+
"zone.js": "~0.8.26"
6871
}
6972
}

src/app/components/fullcalendar/fullcalendar.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {NgModule,Component,ElementRef,OnDestroy,Input,OnInit,AfterViewChecked} from '@angular/core';
22
import {CommonModule} from '@angular/common';
3-
import {Calendar} from 'fullcalendar';
3+
import {Calendar} from '@fullcalendar/core';
44

55
@Component({
66
selector: 'p-fullCalendar',

src/app/showcase/components/fullcalendar/fullcalendardemo.html

+19-3
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,22 @@ <h3>Import</h3>
2020
</pre>
2121

2222
<h3>Getting Started</h3>
23-
<p>FullCalendar is a wrapper around on <a href="https://fullcalendar.io/docs/v4">FullCalendar 4.0.0.alpha.2+</a> so fullcalendar needs to be included in your project. For a complete documentation and samples please refer to the fullcalendar website.
23+
<p>FullCalendar is a wrapper around on <a href="https://fullcalendar.io/docs/v4">FullCalendar 4.0.1+</a> so fullcalendar core needs to be included in your project. For a complete documentation and samples please refer to the <a href="https://fullcalendar.io/">fullcalendar website</a>.</p>
2424
<pre>
2525
<code class="language-markup" pCode ngNonBindable>
26-
npm install [email protected] --save
26+
npm install @fullcalendar/core --save
2727
</code>
2828
</pre>
29-
29+
30+
<p>FullCalendar is plugin based so install the plugins you require and define them with the options property.</p>
31+
<pre>
32+
<code class="language-markup" pCode ngNonBindable>
33+
npm install @fullcalendar/daygrid --save
34+
npm install @fullcalendar/timegrid --save
35+
npm install @fullcalendar/interaction --save
36+
</code>
37+
</pre>
38+
3039
<p>Events should be an array and defined using the events property.</p>
3140
<pre>
3241
<code class="language-markup" pCode ngNonBindable>
@@ -118,6 +127,7 @@ <h3>Options</h3>
118127
this.eventService.getEvents().then(events => &#123;this.events = events;&#125;);
119128

120129
this.options = &#123;
130+
plugins: [dayGridPlugin, timeGridPlugin, interactionPlugin],
121131
defaultDate: '2017-02-01',
122132
header: &#123;
123133
left: 'prev,next',
@@ -172,6 +182,7 @@ <h3>Events</h3>
172182
<pre>
173183
<code class="language-typescript" pCode ngNonBindable>
174184
this.options = &#123;
185+
plugins: [dayGridPlugin, timeGridPlugin, interactionPlugin],
175186
header: &#123;
176187
left: 'prev,next',
177188
center: 'title',
@@ -244,6 +255,10 @@ <h3>Dependencies</h3>
244255

245256
<pre>
246257
<code class="language-typescript" pCode ngNonBindable>
258+
import dayGridPlugin from '@fullcalendar/daygrid';
259+
import timeGridPlugin from '@fullcalendar/timegrid';
260+
import interactionPlugin from '@fullcalendar/interaction';
261+
247262
export class FullCalendarDemo implements OnInit &#123;
248263

249264
events: any[];
@@ -256,6 +271,7 @@ <h3>Dependencies</h3>
256271
this.eventService.getEvents().then(events => &#123;this.events = events;&#125;);
257272

258273
this.options = &#123;
274+
plugins: [dayGridPlugin, timeGridPlugin, interactionPlugin],
259275
defaultDate: '2017-02-01',
260276
header: &#123;
261277
left: 'prev,next',

src/app/showcase/components/fullcalendar/fullcalendardemo.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import {Component,OnInit} from '@angular/core';
22
import {EventService} from '../../service/eventservice';
3+
import dayGridPlugin from '@fullcalendar/daygrid';
4+
import timeGridPlugin from '@fullcalendar/timegrid';
5+
import interactionPlugin from '@fullcalendar/interaction';
36

47
@Component({
58
templateUrl: './fullcalendardemo.html'
@@ -18,11 +21,12 @@ export class FullCalendarDemo implements OnInit {
1821
this.eventService.getEvents().then(events => {this.events = events;});
1922

2023
this.options = {
24+
plugins:[ dayGridPlugin, timeGridPlugin, interactionPlugin ],
2125
defaultDate: '2017-02-01',
2226
header: {
2327
left: 'prev,next',
2428
center: 'title',
25-
right: 'month,agendaWeek,agendaDay'
29+
right: 'dayGridMonth,timeGridWeek,timeGridDay'
2630
},
2731
editable: true
2832
};

src/karma.conf.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module.exports = function (config) {
2222
},
2323
files: [
2424
'../node_modules/moment/moment.js',
25-
'../node_modules/fullcalendar/dist/fullcalendar.js',
25+
'../node_modules/@fullcalendar/core/main.js',
2626
'../node_modules/chart.js/dist/Chart.js',
2727
'../node_modules/quill/dist/quill.js'
2828
],
@@ -34,4 +34,4 @@ module.exports = function (config) {
3434
browsers: ['Chrome'],
3535
singleRun: false
3636
});
37-
};
37+
};

0 commit comments

Comments
 (0)