Giter Site home page Giter Site logo

iomechs / angular-year-calendar Goto Github PK

View Code? Open in Web Editor NEW
19.0 3.0 8.0 5.85 MB

A powerful and performant Angular year calendar library built with ❤️

Home Page: https://iomechs.github.io/angular-year-calendar

License: MIT License

JavaScript 4.30% HTML 28.01% TypeScript 61.83% SCSS 5.86%
angular year-calendar angular-year-calendar iomechs typescript angular-library

angular-year-calendar's Introduction

Angular Year Calendar

@iomechs/angular-year-calendar

Actions Status

npm version github stars License: MIT

npm downloads total npm downloads/month

A simple, easily to use Year calendar for your Angular apps.

@iomechs/angular-year-calendar

Demo

https://iomechs.github.io/angular-year-calendar/demo

Docs

https://iomechs.github.io/angular-year-calendar

Dependencies

The Angular Year Calendar library depends on date-fns and @angular/cdk. If you don't have them installed in your project, you'll have to install them urself.

Usage

Install the package in your project's folder by using npm or yarn:

npm install @iomechs/angular-year-calendar --save

# OR

yarn add @iomechs/angular-year-calendar -S

Import YearCalendarModule in your AppModule as below:

import { YearCalendarModule } from '@iomechs/angular-year-calendar';

@NgModule({
  declarations: [
    AppComponent,
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    BrowserAnimationsModule,
    YearCalendarModule, // <-- here
  ]
});

Then in your HTML, you can use as:

<yc-year-calendar
  [loadingData]="isLoadingData"
  (viewYearChanged)="viewYearChangedHandler($event"
  (eventDayClicked)="eventDayClickHandler($event)"
  [ycConfig]="myCalendarConfig"
  [selectedDate]="currentDate">
</yc-year-calendar>

License

MIT © IOMechs

angular-year-calendar's People

Contributors

ahsanayaz avatar dependabot[bot] avatar mohsinayaz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

angular-year-calendar's Issues

Question: add marks to each day

Hi! Awesome component ❤️
I would like to add color markers (change background-color) to each day cell (individually ex. one color for each day of year)

Is this possible with the current implementation?

I'm trying something like this but it doesn't work:

for (let i = 0; i <= 365; i++) {
  this.config.data.push({
    count: 1,
    color: '#FFC300',
    date: addDays(new Date(2020, 0, 0), i),
  });
}

Thanks for your time!

Module not found: Error: Can't resolve 'date-fns'

After installing this package, when I, include their configuration in App.module and run the app, I am getting this error:

ERROR in ./node_modules/@iomechs/angular-year-calendar/fesm2015/iomechs-angular-year-calendar.js
Module not found: Error: Can't resolve 'date-fns' in '/home/mquanit/Documents/Projects/Angular Typescript Practice/shiny-ivy-app/node_modules/@iomechs/angular-year-calendar/fesm2015'

before that, i am also getting this error:

ERROR in node_modules/@iomechs/angular-year-calendar/lib/components/year-calendar/year-calendar.component.d.ts:4:34 - error TS2307: Cannot find module '@angular/cdk/overlay'.
4 import { CdkOverlayOrigin } from '@angular/cdk/overlay';
ERROR in @iomechs/angular-year-calendar/iomechs-angular-year-calendar.ts(18,5): Error during template compile of 'YearCalendarModule'
Could not resolve @angular/cdk/overlay relative to [object Object]..
There is no directive with "exportAs" set to "cdkOverlayOrigin" ("_body__month__inner__week__day {{ycConfig?.dayClass}}"
cdkOverlayOrigin
[ERROR ->]#heatMapEventDayTrigger="cdkOverlayOrigin"
(click)="eventDayCick(day, heatMapEventDayTr")

but I solved it by doing yarn add @angular/cdk/overlay, but now I am getting the above issue, which is related to date-fns i guess.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.