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

117
Visualizações
React-datepicker selected date format

The current date format: 2021-04-30T23:00:00.000Z

Things tried but not worked (new Date(startDate) new Date(startDate).toLocaleDateString()

The error

RangeError: Invalid time value

var originalDate = toDate(dirtyDate);
  
  if (!isValid(originalDate)) {
   throw new RangeError('Invalid time value');
    } // Convert the date in system timezone to the same date in UTC+00:00 timezone.
     // This ensures that when UTC functions will be implemented, locales will be compatible with them.
     // See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

This is an ISO-8601 date representation, you can convert this by passing it into the Date constructor and call functions like getURChours() on the object

let date = new Date('2021-04-30T23:00:00.000Z');
console.log(date.getUTCHours()); // Hours
console.log(date.getUTCMinutes()); // Minutes
console.log(date.getUTCSeconds()); // Seconds

about 4 years ago · Juan Pablo Isaza Relatório
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