Questions tagged [mat-input]
56 questions
0
votes
1 answer
How to append and prepend a character on the mat input?
I have my html file as
NEC LEC

E S
- 105
- 2
- 8
0
votes
1 answer
matInput Label Hiding on focus
I just started using Angular Material.
I copied a code from Official Material Input docs.
But, whenever I focus on the input, it hides when it floats.
Before Focus
After Focus
P.S. : It happens on every form field and input.
Please Help Me.
Thank…

wh0am1
- 1
- 3
0
votes
2 answers
input event of matInput is called on page load in Internet Explorer 11, when a placeholder is set
I found out that there is a IE bug, where setting the placeholder is calling the input event as described here. This happens on page load, so there was no user interaction.
My code:
app.component.html

testing
- 19,681
- 50
- 236
- 417
0
votes
2 answers
When submitting is done perfectly even if errors come out
I have a form, with a minimum of characters and a maximum, the problem is that if the minimum is 2 characters and I put one I get the mat-error but when giving save it lets you save it with only one character.

Maria Gálvez
- 187
- 1
- 1
- 15
0
votes
1 answer
How to change position of Angular Material placeholder in angular8?
I have angular8 project in which i have angular material. I am using mat-autocomplete for input autocomplete. Here is the code of my html
0
votes
1 answer
How can I set focus for mat-input inside the mat-radio
I am trying to set the focus (the cursor to blink) on the input box on the click on the custom radio button. But it is not happening.I have stackblitz demo here.
so far I have tried.

Avinash.Byalihal
- 137
- 2
- 7
- 22
0
votes
1 answer
checking form control input for errors by using it as a variable
I'm using angular 8 with angular material to write my website.
I have a form with formGroup created and I want to be able to use *ngIf to check for validation errors by using the actual input element as a parameter.
currently this is my working…

ufk
- 30,912
- 70
- 235
- 386
0
votes
1 answer
How to update Mat-Input Place Holder on Focus
I have this material input field where I would like to have a different placeholder When the user focuses the input.
When No Focus & No Value
When User Focuses it
When User Have some Value & Focuses it
Is there an event or work around in…

TBA
- 1,077
- 5
- 41
- 80
-1
votes
1 answer
mat-input still remains invalid after successful validation - Angular 12
Component code-
ngOnInit(): void {
this.form = this.fb.group({
currentPassword: ['', [Validators.required], [this.matchCurrentPassword]],
newPassword: ['', [Validators.required, Validators.minLength(6),…

Valkyrie_30
- 37
- 2
- 7
-1
votes
1 answer
I need to convert ddmmyyyy input to dd/mm/yyyy date format. My html file and ts file is given below
if i give input 21121997 it should convert into 21/12/1997 in date text box. if i give 01012012 then it should convert into 01/01/2012. thats is dd/mm/yyyy format. how to do it?
html code-->

jesno jacob
- 1
- 1
-1
votes
2 answers
Access form group control inside *ngFor
In the template file I'm iterating over an array of elements and for each element a separate row is inserted.
Each element has the same set of controls, but whenever I enter a wrong value inside one of the input fields the same error message appears…

bigb055
- 198
- 3
- 14