3
I get a 4-digit string (numbers), and I need to break it in half, and put a "/", to format in type (dd/mm)
<input [(ngModel)]="contato.birth" class="form-control" type="text" placeholder="DIA/MÊS" mask="99/99" />
and when displaying this value, I need it to be formatted in Javascript, such as (dd / mm) as "06/08", for example. I tried to use the split and Join functions, but I didn’t have much success, I tried it:
formatBirthday(date) {
let result = date.split('-').join('/');
return result
}
<p *ngIf="business.cliente.birth">
<b class="b-b">Aniversário: </b>
{{formatBirthday(business.cliente.birth)}}
</p>
someone would know some way to format only dd / mm?
Your question is not clear!
– LeAndrade
I edited the question, I think it improved
– Arthur Felipe