From eedbbbcdc6c64ade16ffc26e3526e1d0babe91a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Balet?= Date: Sat, 15 Feb 2025 09:31:12 +0100 Subject: [PATCH] feat: fields --- .prettierrc | 10 +++++++++- README.md | 19 ++++++++++--------- package.json | 2 +- .../src/app/app.component.html | 14 ++++++++++++++ projects/ngx-mat-birthday-input/package.json | 2 +- .../lib/ngx-mat-birthday-input.component.html | 6 ++++-- .../lib/ngx-mat-birthday-input.component.ts | 6 ++++++ 7 files changed, 45 insertions(+), 14 deletions(-) diff --git a/.prettierrc b/.prettierrc index b494763..562e95c 100644 --- a/.prettierrc +++ b/.prettierrc @@ -3,5 +3,13 @@ "singleQuote": true, "trailingComma": "all", "semi": false, - "arrowParens": "always" + "arrowParens": "always", + "overrides": [ + { + "files": "*.html", + "options": { + "parser": "angular" + } + } + ] } diff --git a/README.md b/README.md index bc85e0c..eb4a32f 100644 --- a/README.md +++ b/README.md @@ -75,15 +75,16 @@ imports: [NgxMatBirthdayInputComponent]; ## Options -| Options | Type | Default | Description | -| --------------- | --------------- | ---------------------- | -------------------------------------- | -| formControlName | `FormControl` | `undefined` | Control to be updated | -| autocomplete | `"on" or "off"` | `"on"` | Use the default browser autofill | -| labels | `string[]` | `["DD", "MM", "YYYY"]` | Label used by the mat-input | -| placeholders | `string[]` | `["", "", ""]` | with an *s* | -| required | `boolean` | `undefined` | | -| disabled | `boolean` | `undefined` | | -| min | `date` | `undefined` | Activate min validators on each fields | +| Options | Type | Default | Description | +| --------------- | ----------------------------------------------- | -------------------------------------- | -------------------------------------- | +| formControlName | `FormControl` | `undefined` | Control to be updated | +| autocomplete | `"on" or "off"` | `"on"` | Use the default browser autofill | +| labels | `string[]` | `["DD", "MM", "YYYY"]` | Label used by the mat-input | +| placeholders | `string[]` | `["", "", ""]` | with an *s* | +| required | `boolean` | `undefined` | | +| disabled | `boolean` | `undefined` | | +| min | `date` | `undefined` | Activate min validators on each fields | +| fields | `{day: boolean, month: boolean, year: boolean}` | `{day: true, month: true, year: true}` | Show specifies fields | ## Css variable | Name | Default | Explanation | diff --git a/package.json b/package.json index 66e082d..3e197ae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ngx-mat-birthday-input", - "version": "19.2.1", + "version": "19.3.0", "scripts": { "ng": "ng", "start": "ng serve", diff --git a/projects/ngx-mat-birthday-input-tester/src/app/app.component.html b/projects/ngx-mat-birthday-input-tester/src/app/app.component.html index 29ca99f..449beac 100644 --- a/projects/ngx-mat-birthday-input-tester/src/app/app.component.html +++ b/projects/ngx-mat-birthday-input-tester/src/app/app.component.html @@ -37,6 +37,20 @@

Mat birthday Input example

+
+ + Hidden year + + + + +
+