src/demo/app/app.component.ts
selector | demo-app |
templateUrl | ./app.component.html |
Properties |
Methods |
|
constructor()
|
Defined in src/demo/app/app.component.ts:15
|
Private updateDate | ||||||||
updateDate(ev: )
|
||||||||
Defined in src/demo/app/app.component.ts:21
|
||||||||
Parameters :
Returns :
void
|
Private minDate |
minDate:
|
Default value : 01/01/1900
|
Defined in src/demo/app/app.component.ts:8
|
Private options |
options:
|
Defined in src/demo/app/app.component.ts:9
|
import { Component } from '@angular/core';
@Component({
selector: 'demo-app',
templateUrl: './app.component.html'
})
export class AppComponent {
private minDate = '01/01/1900';
private options = {
minDate: '01/01/1900',
maxDate: 'today',
usefullDate: false,
holiday: false,
weekend: false
};
constructor() {
this.updateDate('date');
}
private updateDate(ev) {
console.log(ev);
}
}
<div>
<h1>Try some configs:</h1>
<input type="datetime" name="" value="">
<input type="date" name="" value="">
<input type="checkbox" name="" value="Usefull Date">
<input type="checkbox" name="" value="Holiday">
<input type="checkbox" name="" value="Weekend">
<date-format
[minDate]="options.minDate"
[maxDate]="options.maxDate"
[usefullDate]="options.usefullDate"
[holiday]="options.holiday"
[weekend]="options.weekend"
placeholder="DD/MM/YYYY"
(ngModelChange)="updateDate($event)">
</date-format>
<h2>Raw config:</h2>
<p>{{ options | json }}</p>
</div>