我将模式日期用于 bsDatepicker 并且工作正常。
<input type="text" class="form-control" formControlName="birthday" bsDatepicker
[bsConfig]="bsConfig" [(bsValue)]="birthday" value="{{dataNascimento | date:'dd/MM/yyyy - dd/MM/yyyy' }}" />
但是在 bsDaterangepicker 中不起作用
<input class="form-control" #drp="bsDaterangepicker" bsDaterangepicker [bsConfig]="bsConfig"
[maxDate]="bsConfig.maxDate" value="{{periodo | date:'dd/MM/yyyy - dd/MM/yyyy' }}" />
错误信息
ERROR Error: InvalidPipeArgument: 'Wed Nov 22 2017 12:50:19 GMT-0200 (Horário brasileiro de verão),Wed Nov 22 2017 12:50:19 GMT-0200 (Horário brasileiro de verão)' for pipe 'DatePipe'
ngx-bootstrap、Angular 和 Bootstrap 的版本:
ngx-bootstrap:2.0.0-beta.8
角度:5.0.0
引导程序:3.3.7
构建系统:Angular CLI 1.5.2
问题
谁来为 Daterangepicker 定义日期模式?