Slice before blank space text input

how i can show only the first name? before blank space?

{{ moment.tz("America/Panama").format('DD-MM-yyyy') }} {{ nombres.value }}

right now im using this code where nombres.value its JOHN DOE, but i just need JOHN in the first input so shoud be 10-10-2024 JOHN, for example, not JOHN DOE

You could split the string and use the first entry - eg {{ nombres.value.split(' ')[0] }}

2 Likes

awesome, thank you