angular-material-extensions / calendar

Angular responsive calendar built with material design for desktop and mobile
MIT License
21 stars 5 forks source link
angular calendar dates desktop events library material material-extensions mobile ui

angular-material-extensions' logo

calendar - angular responsive calendar built with material design for desktop and mobile

npm version npm demo Join the chat at https://gitter.im/angular-material-extensions/Lobby Build Status Coverage Status dependency Status devDependency Status Greenkeeper Badge license

Built by and for developers :heart:

Do you have any question or suggestion ? Please do not hesitate to contact us! Alternatively, provide a PR | open an appropriate issue here

If did you like this project, support angular-material-extensions by starring :star: and sharing it :loudspeaker:

Table of Contents

Demo

View all the directives in action at https://angular-material-extensions.github.io/calendar

Dependencies


Requirements (peer dependencies):

npm i @angular/cdk @angular/material @angular/animations @angular/forms 

or use angular schematics like e.g:

ng add @angular/material 

Additional requirements Theme (Material Design)

Additional Requirements - Import the material design icons learn more

<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  1. Install of the official npm module of the material design icons
npm i -s material-design-icons
  1. Import them in your angular.json file
"styles": [
        "styles.css",
        "../node_modules/material-design-icons/iconfont/material-icons.css"
      ],

Installation

Install above dependencies via npm.

Now install @angular-material-extensions/calendar via:

npm install --save @angular-material-extensions/calendar

SystemJS

Note:If you are using SystemJS, you should adjust your configuration to point to the UMD bundle. In your systemjs config file, map needs to tell the System loader where to look for @angular-material-extensions/calendar:

map: {
'@angular-material-extensions/calendar': 'node_modules/@angular-material-extensions/calendar/bundles/calendar.umd.js',
}

Once installed you need to import the main module:

import { MatCalendarModule } from '@angular-material-extensions/calendar';

The only remaining part is to list the imported module in your application module. The exact method will be slightly different for the root (top-level) module for which you should end up with the code similar to (notice MatCalendarModule .forRoot()):

import { MatCalendarModule } from '@angular-material-extensions/calendar';

@NgModule({
  declarations: [AppComponent, ...],
  imports: [MatCalendarModule.forRoot(), ...],  
  bootstrap: [AppComponent]
})
export class AppModule {
}

Other modules in your application can simply import MatCalendarModule:

import { MatCalendarModule } from '@angular-material-extensions/calendar';

@NgModule({
  declarations: [OtherComponent, ...],
  imports: [MatCalendarModule, ...], 
})
export class OtherModule {
}

Usage

Run Demo App Locally

$ gulp link

Development

  1. clone this repo
  2. Install the dependencies by running npm i
  3. build the library npm run build or gulp build
  4. Link the library gulp link
    1. Navigate to the demo app's directory
      • cd demo npm i npm start

Other Angular Libraries


Support


jetbrains logo

This project is supported by jetbrains with 1 ALL PRODUCTS PACK OS LICENSE incl. webstorm


License

Copyright (c) 2018 Anthony Nahas. Licensed under the MIT License (MIT)