Skip to content

Commit c513acf

Browse files
committed
add datepicker
1 parent a993cff commit c513acf

File tree

6 files changed

+52
-9
lines changed

6 files changed

+52
-9
lines changed

package-lock.json

Lines changed: 43 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"@angular/platform-browser": "8.2.9",
5959
"@angular/platform-browser-dynamic": "8.2.9",
6060
"@angular/router": "8.2.9",
61+
"@giomamaladze/ng2-semantic-ui": "0.10.8",
6162
"bootstrap": "4.3.1",
6263
"core-js": "3.2.1",
6364
"hammerjs": "2.0.8",

src/app/app.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ <h1 class="title">
5252
<input
5353
matInput
5454
placeholder="Phone number"
55-
mask="(000) 000-0000"
56-
prefix="+5 "
57-
[(ngModel)]="test"
55+
mask="00.00.0000"
5856
[showOnFocus]="true"
57+
suiDatepicker
58+
pickerMode="date"
5959
/>
6060
<mat-hint><b>Mask: </b>+5 (000) 000 0000</mat-hint>
6161
</mat-form-field>

src/app/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export class AppComponent {
7373
public commaSeparatorForm!: FormControl;
7474
public commaPrecisionSeparatorForm!: FormControl;
7575
public commaZeroPrecisionSeparatorForm!: FormControl;
76-
public test = '5435 5 345';
76+
public test = '';
7777

7878
public constructor() {
7979
this.form = new FormControl('');

src/app/app.module.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ import { BrowserModule } from '@angular/platform-browser';
1717
import { NgModule } from '@angular/core';
1818
import 'hammerjs';
1919

20-
2120
import { AppComponent } from './app.component';
22-
import { NgxMaskModule } from 'ngx-mask';
21+
import { NgxMaskModule } from 'projects/ngx-mask-lib/src';
22+
import { SuiModule } from '@giomamaladze/ng2-semantic-ui';
2323

2424
@NgModule({
2525
declarations: [AppComponent, TestMaskComponent],
@@ -41,6 +41,7 @@ import { NgxMaskModule } from 'ngx-mask';
4141
MatListModule,
4242
MatCardModule,
4343
FormsModule,
44+
SuiModule,
4445
],
4546
providers: [],
4647
bootstrap: [AppComponent],

src/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<meta name="author" content=""/>
77
<title>ng2Mask-Plugin - A Angular2 plugin to make field masks.</title>
88
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/styles/default.min.css">
9+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.13/semantic.min.css">
910
</head>
1011
<body>
1112
<app-root>

0 commit comments

Comments
 (0)