OI Tarea Cierre con idicador Tipo 1
This commit is contained in:
@@ -696,8 +696,13 @@
|
||||
$('#<%=TxtObservaciones.ClientID%>').val(event.title);
|
||||
$('#<%=TxtDescripcion.ClientID%>').val(event.title);
|
||||
$('#<%=TxtUbicacion.ClientID%>').val(event.NombreAcercamiento);
|
||||
$('#<%=TxtFechaSalida.ClientID%>').val(event.start._i);
|
||||
$('#<%=TxtFechaRegreso.ClientID%>').val(event.end._i);
|
||||
|
||||
<%--$('#<%=TxtFechaSalida.ClientID%>').val(event.start._i);
|
||||
$('#<%=TxtFechaRegreso.ClientID%>').val(event.end._i);--%>
|
||||
|
||||
$('#<%=TxtFechaSalida.ClientID%>').val(formatearFechaISO(event.start._i));
|
||||
$('#<%=TxtFechaRegreso.ClientID%>').val(formatearFechaISO(event.FechaFinal));
|
||||
|
||||
$('#<%=DdlClientes.ClientID%>').val(event.CveCliente);
|
||||
$('#<%=DdlAF.ClientID%>').val(event.CveActivoFijo);
|
||||
$('#<%=DdlChofer.ClientID%>').val(event.CvePersonal);
|
||||
@@ -720,6 +725,30 @@
|
||||
$('#<%=BtnModal.ClientID%>').click();
|
||||
}
|
||||
|
||||
|
||||
function formatearFechaISO(fechaISO) {
|
||||
let fecha = new Date(fechaISO);
|
||||
|
||||
// Formatear la fecha en DD/MM/YYYY
|
||||
let dia = fecha.getDate().toString().padStart(2, '0');
|
||||
let mes = (fecha.getMonth() + 1).toString().padStart(2, '0'); // getMonth() devuelve mes de 0-11
|
||||
let año = fecha.getFullYear();
|
||||
|
||||
// Formatear la hora en formato 12 horas con AM/PM
|
||||
let horas = fecha.getHours();
|
||||
let minutos = fecha.getMinutes().toString().padStart(2, '0');
|
||||
let periodo = 'a. m.';
|
||||
if (horas >= 12) {
|
||||
periodo = 'p. m.';
|
||||
horas = horas > 12 ? horas - 12 : horas; // Convertir hora de formato 24 a 12 horas
|
||||
}
|
||||
if (horas === 0) horas = 12; // Medianoche se muestra como 12 a.m.
|
||||
horas = horas.toString().padStart(2, '0');
|
||||
|
||||
// Combinar la fecha y la hora
|
||||
return `${dia}/${mes}/${año} ${horas}:${minutos}:00 ${periodo}`;
|
||||
}
|
||||
|
||||
function RadionButtonSelectedValueSet(name, SelectdValue) {
|
||||
$('input[name="' + name + '"][value="' + SelectdValue + '"]').prop('checked', true);
|
||||
}
|
||||
@@ -824,6 +853,8 @@
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user