automate-datepicker
v1.5.3
Published
Automate datepicker is a simple datepicker for Automate web sites purposes.
Readme
Automate DatePicker
Automate datepicker is a simple datepicker for Automate web sites purposes.
Features
- [x] Custom formatting
- [x] Min/Max date restriction
- [x] Ability to disable specific days of week
- [x] Ability to disable specific dates
- [x] Ability to hightlight specific dates
- [x] Ability to change initial view (days, month, year)
- [x] Custom template
- [x] Accessibility
- [x] Themes
Warning
Library is under active development and may have API breaking changes for subsequent major versions after 1.0.0.
Getting started
Step 1: Install automate-datepicker:
NPM
npm install --save @automate-datepickerStep 2: Import the AutomateDatePickerModule and angular FormsModule module:
import { AutomateDatePickerModule } from 'automate-datepicker';
import { FormsModule } from '@angular/forms';
@NgModule({
declarations: [AppComponent],
imports: [AutomateDatePickerModule, FormsModule],
bootstrap: [AppComponent]
})
export class AppModule {}Usage
Define options in your consuming component:
@Component({...})
export class ExampleComponent {
selectedDate: Date;
}In template use automate-datepicker component with your options
<!--Using template-->
<automate-datepicker [(ngModel)]="selectedDate">
<ng-template appendToTmp let-formattedDate="formattedDate">
<button>{{formattedDate}}</button>
</ng-template>
</automate-datepicker>
<!--Simple use-->
<automate-datepicker [(ngModel)]="selectedDate">
</automate-datepicker>API
Inputs
Outputs
Methods
Configuration: In order to provide configurations to the date-picker you need to pass it to the automate-datepicker component:
<automate-datepicker [(ngModel)]="selectedDate" [config]="config"></automate-datepicker>Here are the available configurations:
