Compatible with Angular 6 and up
- ๐ Picks dates
- ๐ฅ Blazing fast
- ๐ฑ Tap, pan & swipe enabled
- ๐ฑ๏ธ Mouse friendly
- ๐ง Minimal required styles
- ๐จ Maximally themeable
- โ Specify min & max dates
- ๐ท๏ธ Customizable labels & date formats
- ๐ Transitions smoothly between daily, monthly & yearly views
- ๐ฃ๏ธ Doesn't block vertical page scrolling on touch devices
-
Skimmed Datepicker is available as a package on npm. Simply use ubiquitous command and you are good to go!
npm i skimmed-datepicker
Alternatively when using Yarn:
yarn add skimmed-datepicker
-
Import
BrowserAnimationsModule
into root module & andDatepickerModule
wherever you want to use itimport { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { DatepickerModule } from 'skimmed-datepicker'; @NgModule({ imports: [ BrowserAnimationsModule, DatepickerModule, ], }) export class AppModule { }
Ensure that
@angular/animations
package is installed. -
Include stylesheet
TODO
-
(Optional) For gesture support install and import
hammerjs
globally.npm i hammerjs
A popular place, recommended by Angular Material, is
src/main.ts
.import 'hammerjs';
-
Use
skm-datepicker
in a template<skm-datepicker [formControl]="dateControl"></skm-datepicker> <skm-datepicker [(ngModel)]="date"></skm-datepicker> <skm-datepicker [(date)]="date"></skm-datepicker>
TODO: Freeze API & document everything
date: Date;
min: Date;
max: Date;
deselectEnabled: boolean;
yearFormat = 'y';
headingFormat = 'MMMM y';
firstWeekDay = WeekDay.Monday;
dayLabels: string[];
weekDayLabels: string[];
monthLabels: string[];
dateChange: EventEmitter<Date>;
- Full compatibility with
ReactiveFormsModule
- Extend configurability
- Popover mode
- Keyboard support
- Improve accessibility
- Date range mode
- Expose as Web Component
- Created by Tomasz Bลachut (@tomblachut)
- Spatial easing function perfected by Michaล Wiatrowski (@michel4ngel0)