Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

216
Vistas
How can i get a date with yyyy_mm_dd format from a datepicker?

i have 2 datepickers, both of them have the same structuture. The only difference is their name. One has id="fecha_1_1" and the other one id="fecha_1_2"

<div class="col-sm-3">
    <p>Desde</p>
    <div class="form-group">
        <div class="form-line">
            <input id="fecha_1_2" type="text" class="datepicker form-control" placeholder="Seleccione una fecha de inicio" />
        </div>
    </div>
</div>

and i detect if one of them changes with this sentence:

 $('#fecha_1_2, #fecha_1_1').bootstrapMaterialDatePicker().on('dateSelected', function (e, date)

the problem is that i need to access to the date of the one that didn´t triggered the ajax sentence, and with $(fecha_x_x).val() i get a date with the format day, dd mm yyyy and i need it with yyyy_mm_dd format

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

If you want to make it in pure Javascript you can use toISOString() that would give you something like this: 2021-07-02T13:06:53.422Z (YYYY-MM-DD HH:mm:ss sss) , or you try it with moment().format('YYYY-MM-DD');

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda