GithubHelp home page GithubHelp logo

jkuri / ngx-airbnb-calendar Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 2.0 997 KB

Angular Airbnb Like Date Range Calendar Picker

License: MIT License

JavaScript 8.00% HTML 10.69% TypeScript 55.41% Sass 25.90%

ngx-airbnb-calendar's Introduction

AirbnbCalendar

You can find online running demo here.

Usage

Install or add via ng

ng add ngx-airbnb-calendar

Then add AirbnbCalendarModule into your AppModule

import { AirbnbCalendarModule } from 'ngx-airbnb-calendar';

@NgModule({
  imports: [BrowserModule, AirbnbCalendarModule],
  declarations: [AppComponent]
})
export class AppModule {}

Set options in your component:

import { Component } from '@angular/core';
import { CalendarOptions } from 'ngx-airbnb-calendar';

@Component({
  selector: 'app-root',
  templateUrl: 'app.component.html'
})
export class AppComponent {
  options: CalendarOptions = {
    firstCalendarDay: 1,
    format: 'dd-LL-yyyy'
  };
}

And use airbnb-calendar directive on your <input />

<input type="text" [(ngModel)]="value" airbnb-calendar [options]="options" />

Available Options

Option Description Value Type Default Value
minDate Minimum date available for selection Date null
maxDate Maximum date available for selection Date null
minYear Minimal shown year in calendar number null
maxYear Maximum shown year in calendar number null
format date-fns format used to generate ngModel value string yyyy/LL/dd
formatTitle date-fns format used to display month and year in calendar controls string MMMM uuuu
formatDays date-fns format used to display day names in calendar header string eeeeee
firstCalendarDay Options to configure first day in calendar, ie 0 for Sunday or 1 for Monday number 0
locale date-fns locale for days and months translation Locale enUS
closeOnSelected Option enables auto close calendar on date range selection boolean false

License

MIT

ngx-airbnb-calendar's People

Contributors

jkuri avatar

Stargazers

Julian Henao Marin avatar

Watchers

James Cloos avatar  avatar  avatar

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.