Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nekken/ng2-fullcalendar
https://github.com/nekken/ng2-fullcalendar
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/nekken/ng2-fullcalendar
- Owner: nekken
- Created: 2016-11-12T04:13:34.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-26T15:34:53.000Z (over 6 years ago)
- Last Synced: 2024-09-19T05:49:42.195Z (3 months ago)
- Language: TypeScript
- Size: 370 KB
- Stars: 95
- Watchers: 12
- Forks: 47
- Open Issues: 48
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-angular-components - angular2-fullcalendar - An Angular 2 component for fullcalendar. (Uncategorized / Uncategorized)
- awesome-angular-components - angular2-fullcalendar - An Angular 2 component for fullcalendar. (Uncategorized / Uncategorized)
- awesome-ionic2-components - Calendar - Fullcalendar
- Awesome - Calendar - Fullcalendar
README
# Angular 2: FullCalendar component
An Angular 2 component for [fullcalendar](https://fullcalendar.io/).
## Installation
```
npm install angular2-fullcalendar --save
```
## Usage
####Import the calendar component
```
import {CalendarComponent} from "angular2-fullcalendar/src/calendar/calendar";
// other imports@NgModule({
declarations: [
// other declarations
CalendarComponent
],
// ...
})
export class AppModule {}
```
#### Add config in my-component.ts
For a full list of options available, please refer to fullcalendar.io documentation at https://fullcalendar.io/docs/
```
@Component({
selector: 'my-component',
templateUrl: 'my-component.html'
})
export class MyComponent{
calendarOptions:Object = {
height: 'parent',
fixedWeekCount : false,
defaultDate: '2016-09-12',
editable: true,
eventLimit: true, // allow "more" link when too many events
events: [
{
title: 'All Day Event',
start: '2016-09-01'
},
{
title: 'Long Event',
start: '2016-09-07',
end: '2016-09-10'
},
{
id: 999,
title: 'Repeating Event',
start: '2016-09-09T16:00:00'
},
{
id: 999,
title: 'Repeating Event',
start: '2016-09-16T16:00:00'
},
{
title: 'Conference',
start: '2016-09-11',
end: '2016-09-13'
},
{
title: 'Meeting',
start: '2016-09-12T10:30:00',
end: '2016-09-12T12:30:00'
},
{
title: 'Lunch',
start: '2016-09-12T12:00:00'
},
{
title: 'Meeting',
start: '2016-09-12T14:30:00'
},
{
title: 'Happy Hour',
start: '2016-09-12T17:30:00'
},
{
title: 'Dinner',
start: '2016-09-12T20:00:00'
},
{
title: 'Birthday Party',
start: '2016-09-13T07:00:00'
},
{
title: 'Click for Google',
url: 'http://google.com/',
start: '2016-09-28'
}
]
};
}
}
```
#### Add selector in template file my-component.html
``````
#### Import the fullcalendar css
If you're using Angular CLI, this is as simple as including one line in your style.css file:
```
@import "fullcalendar/dist/fullcalendar.min.css";
```
Alternatively, you can just reference the file directly. This would look something like
``````
## TODO's
* Tests