• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Pruebas Online
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

159
Vistas
Is there a way to change the datetime format in fullcalender version 5.9.0 on eventdrop

The ajax request is sending date and time in the following format

id  "41"
start   "Mon+Oct+04+2021+17:10:00+GMT+0300+(East+Africa+Time)+17:10:0"
end "Mon+Oct+04+2021+18:40:00+GMT+0300+(East+Africa+Time)+18:40:0"

Is there a way to change it to meet the following format

 id "41"
    start   "2021-10-04 17:10:0"
    end "202110-04 18:40:0"

My code at eventdrop look like this

 eventDrop: function(arg) {
            var start = arg.event.start+' '+arg.event.start.getHours()+':'+arg.event.start.getMinutes()+':'+arg.event.start.getSeconds();
            if (arg.event.end == null) {
                end = start;
            } else {
                var end = arg.event.end+' '+arg.event.end.getHours()+':'+arg.event.end.getMinutes()+':'+arg.event.end.getSeconds();
            }
            $.ajax({
              url: 'process/edit.php',
              type:"POST",
              data:{id:arg.event.id, start:start, end:end},
            });
        }

Any suggestion please, Note this is Fullcalendar version 5.9.0

almost 3 years ago · Juan Pablo Isaza
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 Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda