Skip to content

Commit 972ec55

Browse files
committed
docs: add possibility to reset 12-hours option
1 parent a96ef26 commit 972ec55

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

Diff for: projects/angular-intl-demo/src/app/pipes/date/date.component.html

+8-3
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,14 @@
2929
</mat-select>
3030
</mat-form-field>
3131

32-
<mat-slide-toggle [(ngModel)]="hour12">
33-
12 Hours
34-
</mat-slide-toggle>
32+
<mat-form-field>
33+
<mat-label>12 Hours</mat-label>
34+
<mat-select [(ngModel)]="hour12">
35+
<mat-option [value]="undefined">Browser default</mat-option>
36+
<mat-option [value]="true">true</mat-option>
37+
<mat-option [value]="false">false</mat-option>
38+
</mat-select>
39+
</mat-form-field>
3540
</div>
3641

3742
<p>{{selectedDate | intlDate: {dateStyle, timeStyle, hour12, locale} }}</p>

Diff for: projects/angular-intl-demo/src/app/pipes/pipes.module.ts

-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {MatTabsModule} from "@angular/material/tabs";
1010
import {IntlModule} from "projects/angular-ecmascript-intl/src/lib/intl.module";
1111
import {MatSelectModule} from "@angular/material/select";
1212
import {FormsModule} from "@angular/forms";
13-
import {MatSlideToggleModule} from "@angular/material/slide-toggle";
1413
import {MatInputModule} from "@angular/material/input";
1514
import {PipesRoutingModule} from "./pipes-routing.module";
1615

@@ -30,7 +29,6 @@ import {PipesRoutingModule} from "./pipes-routing.module";
3029
IntlModule,
3130
MatSelectModule,
3231
FormsModule,
33-
MatSlideToggleModule,
3432
MatInputModule,
3533
],
3634
})

0 commit comments

Comments
 (0)