ad

angular2-datepickr

Angular2 Datepicker

Showing:

Popularity

Downloads/wk

16

Maintenance

No Maintenance Data Available

Package

Dependencies

0

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Deprecated!
WARNING: This project has been renamed to angular-datepickr. Install using angular-datepickr instead.

Readme

Angular2-datepickr

Angular2 Datepicker Component

angular2-datepickr is a datepicker component for Angular2.

Demo

Desktop Desktop

Modal Modal

Installation

Required libraries: moment.js

Install angular2-datepickr via npm

npm install angular2-datepickr --save

Usage

import { Angular2DatepickerModule } from 'angular2-datepickr/angular2-datepickr';

@NgModule({
    declarations: [
        AppComponent
    ],
    imports: [
        CommonModule,
        ReactiveFormsModule,
        FormsModule,
        Angular2DatepickerModule
    ],
    providers: [],
    bootstrap: [AppComponent]
})
export class AppModule {
}
<jb-input-datepicker formControlName="date"></jb-input-datepicker>
<jb-text-datepicker formControlName="date2"></jb-text-datepicker>

Configuration

Global configuration

Angular2DatepickerModule.forRoot(new Angular2DatepickerOptions({ todayString: 'DNES', modalMediaQuery: 'max-width: 750px' }))

Local configuration

<jb-input-datepicker formControlName="date" [options]="{todayHighlight:'false'}"></jb-input-datepicker>
OptionDescriptionDefault
format: stringformat for model value'DD.MM.YYYY'
viewFormat: stringformat for view'DD.MM.YYYY'
firstWeekdaySunday: booleanweek in calendar starts with sundayfalse;
todayString: stringtext on the today buttonTODAY
todayButtonEnabled: booleantoday button is showntrue
todayHighlight: booleantoday is highlightedtrue
weekendHighlight: booleansaturday and sunday is highlighted with colortrue
modalMediaQuery: stringmedia query which will be matched to show calendar in modalnone

Licence

This project is licensed under the MIT license. See the LICENSE file for more info.

Contributing

Filling issues and Pull requests are welcome

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100