angular-material-datetimepicker

Multiple Date Select in Material datePicker (Angular)

瘦欲@ 提交于 2020-01-03 05:15:12
问题 I have a requirement that a user can select multiple dates in a date picker. How can I implement multiple date select functionality in an Angular Material date picker? I tried this through dateClass . But, after every date selection the date picker will be closed. Here's what I tried HTML code: <input matInput [matDatepicker]="picker" placeholder="Choose a date"> <mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle> <mat-datepicker [dateClass]="dateClass" #picker></mat

Set default value for angular material datePicker with angular 5

旧街凉风 提交于 2019-12-22 05:07:02
问题 I'm using a date picker from angular material. I want to set a default value but it is not showing the value. <mat-form-field class="mr-sm-24" fxFlex (click)="open()" > <input matInput [picker]="picker" placeholder="Date" autocomplete="off" name="date" formControlName="date"> <mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle> <mat-datepicker [startAt]="startDatePicker" #picker></mat-datepicker> </mat-form-field> this is my .js code with the value that i want to set as

Angular Material 7 Datepicker: Disable multi year view

你。 提交于 2019-12-14 03:08:40
问题 I'm using the MatDatepicker from @angular/material ^7.0.0-rc.0, and I made a little complex filter that compares every visible day in the timepicker with every day of an array with about 200 or 300 values. It breaks the aplication every time I switch the datepicker to multi-year view mode. I just want to disable or disallow the multi-year view mode, and let only month mode and year mode working. HTML: <mat-form-field (click)="picker.open()" class="date-field"> <span>{{(dataFields['mosaic_'