Skip to content

Commit

Permalink
docs(date-range-picker): Include docs for DateRangepicker custom format
Browse files Browse the repository at this point in the history
Added the demo of custom format for date range picker
I've tried to find this many times, and probably others do to :)
  • Loading branch information
AhsanAyaz committed May 10, 2019
1 parent 4e9fda6 commit 8cccc45
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,21 @@
<button class="btn btn-success" (click)="dpFull.toggle()" [attr.aria-expanded]="dpFull.isOpen">Date Picker</button>
</div>
</div>

<div class="row">
<div class="col-xs-12 col-md-5 col-lg-4 form-group">
<input type="text"
class="form-control"
[minDate]="minDate"
[maxDate]="maxDate"
formControlName="myDateRange"
#dRP="bsDaterangepicker"
bsDaterangepicker
[bsConfig]="{ rangeInputFormat: 'MMMM Do YYYY, h:mm:ss a' }">
</div>
<div class="col-xs-12 col-12 col-md-3 form-group">
<button class="btn btn-success" (click)="dRP.toggle()" [attr.aria-expanded]="dRP.isOpen">Date Range Picker</button>
</div>

</div>
</form>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export class DemoDatePickerCustomFormatComponent {
myForm = new FormGroup({
myDateYMD: new FormControl(new Date()),
myDateFull: new FormControl(new Date()),
myDateMDY: new FormControl(new Date())
myDateMDY: new FormControl(new Date()),
myDateRange: new FormControl([new Date(), new Date()])
});
}

0 comments on commit 8cccc45

Please sign in to comment.