-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(datepicker): decompose Basic demo
- Loading branch information
svetoldo4444ka
committed
Feb 9, 2018
1 parent
db1a4df
commit af7ba73
Showing
5 changed files
with
51 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
<div class="row"> | ||
<div class="col-xs-12 col-12 col-md-4 form-group"> | ||
<input type="text" | ||
placeholder="Please choose a date" | ||
placeholder="Datepicker" | ||
class="form-control" | ||
bsDatepicker> | ||
</div> | ||
<div class="col-xs-12 col-12 col-md-4 form-group"> | ||
<input type="text" | ||
placeholder="Daterangepicker" | ||
class="form-control" | ||
bsDaterangepicker> | ||
</div> | ||
</div> | ||
|
23 changes: 23 additions & 0 deletions
23
demo/src/app/components/+datepicker/demos/date-initial-state/date-initial-state.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<h4>bsValue property sets initial state in this example</h4> | ||
<div class="row"> | ||
<div class="col-xs-12 col-12 col-md-4 form-group"> | ||
<input type="text" | ||
class="form-control" | ||
#dp="bsDatepicker" | ||
bsDatepicker | ||
[bsValue]="bsValue"> | ||
</div> | ||
<div class="col-xs-12 col-12 col-md-3 form-group"> | ||
<button class="btn btn-success" (click)="dp.toggle()">Date Picker</button> | ||
</div> | ||
</div> | ||
|
||
<h4>ngModel property sets two-way data binding in this example</h4> | ||
<div class="row"> | ||
<div class="col-xs-12 col-12 col-md-4 form-group"> | ||
<input class="form-control" #drp="bsDaterangepicker" bsDaterangepicker [(ngModel)]="bsRangeValue"> | ||
</div> | ||
<div class="col-xs-12 col-12 col-md-3 form-group"> | ||
<button class="btn btn-success" (click)="drp.toggle()">Date Range Picker</button> | ||
</div> | ||
</div> |
10 changes: 10 additions & 0 deletions
10
demo/src/app/components/+datepicker/demos/date-initial-state/date-initial-state.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'demo-datepicker-date-initial-state', | ||
templateUrl: './date-initial-state.html' | ||
}) | ||
export class DemoDatepickerDateInitialStateComponent { | ||
bsValue: Date = new Date(); | ||
bsRangeValue: any = [new Date(2017, 7, 4), new Date(2017, 7, 20)]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters