Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

221
Visualizações
Formated date in javascript and firebase and reactJS ISO 8601

i would like to format my date coming from firebase to 'dd/MM/yyyy' format using javascript. The date in firebase database, is as timestamp field. I need show on the fron end the date formatted as ISO 8601

Code for store the values:

function NewEPI(){
    const [name, setName] = useState('');
    const [date, setDate] = useState('');

    const db = firebase.firestore();

    return <div>
        <Navbar/>
        <div className='container-fluid title>
            <div className='offset-lg-2 col-lg-8 text-center'>
                <h1> Cadastre </h1>
                <form>
                    <div className='row g-2'>
                        <div className='form-floating'>
                            <input onChange={(e) => setName(e.target.value)} type='text' className='form-control' id='floatingInput' placeholder='Your name'/>
                        </div>
                    </div>

                    <div className='col-md'>
                        <div className='form-floating>
                            <input onChange={(e) => setDate(e.target.value)} type='date' className='form-control' id='floatingInput' placeholder='Date'/>
                        <label htmlfor='floatingInput> Date </label>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
}

Code that returns the list of values in table:

{
    props.arrayEpis.map((epi) => {
        return <tr key={epi.id} className='text-center'>
            <td> {epi.name} </td>
            <td> {epi.date} </td>
    })
}
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda