rafaelaqueirozg / angular-day-picker

A simple and customizable day picker component built with Angular.

Home Page:https://angular-day-picker.stackblitz.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ“† Angular Day-Picker

Angular Day-Picker is a simple and customizable day picker component built with Angular.

πŸ“Œ Live demo

See it in action, check out the demo page.

πŸš€ Technologies

⛏ Tools

Or edit on Stackblitz.

πŸ’» Usage

Install this lib

npm i --save ng-day-picker

In your module:

import { NgDayPickerModule } from 'ng-day-picker'

@NgModule({
  imports: [
    NgDayPickerModule
  ]
})

In your component:

import { Component } from "@angular/core";

import { SelectedDaysEmitter } from "ng-day-picker";

@Component({
  selector: "app",
  templateUrl: "./app.component.html",
  styleUrls: ["./app.component.scss"],
})
export class AppComponent {
  selectedDays({
    selectedDays,
    humanizedSelectedDays,
  }: SelectedDaysEmitter): void {
    console.log("selectedDays", selectedDays);
    console.log("humanizedSelectedDays", humanizedSelectedDays);
  }
}

In your HTML:

<ng-day-picker
  [label]="'Your label here'"
  [range]="{ initialDay: 1, finalDay: 31 }"
  [required]="true"
  [disabledDays]="[1, 31]"
  [maxSelectableDays]="5"
  (selectedDaysEmitter)="selectedDays($event)"
></ng-day-picker>

🀝 Contributions

Feel free to contribute. Suggestions, bugs reports or new features are always welcome.

πŸ“” License

This project is under the MIT LICENSE.

✨ Acknowledgment

I want to thank my friend Diego for all the support and sugestions on this project; to my mentor Danilo for the tips and encouragement; to me for never giving up, always looking to learn and evolve; and to everyone who supports me directly or indirectly.

Made with ❀️ by Rafaela Queiroz

About

A simple and customizable day picker component built with Angular.

https://angular-day-picker.stackblitz.io

License:MIT License


Languages

Language:TypeScript 70.9%Language:CSS 10.8%Language:HTML 9.7%Language:JavaScript 8.6%