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

267
Vistas
Jquery datepicker parsing date/time error

I could not resolve the parsing date/time error from Struts2 jquery tag datepicker when setting the minDate. Have tried both date and timestamp as the minDate parameter but the error is still showing. There is no online solution so to seek for some solutions here. I require the datetime format to be (dd M yy HH:mm:ss). Error is logged by timepicker v1.6.3.

Error Line

e.timepicker.log = function() {
    window.console && window.console.log && window.console.log.apply && window.console.log.apply(window.console, Array.prototype.slice.call(arguments))
}

Library

  • jQuery v3.5.1
  • jQuery UI v1.12.1
  • jQuery Migrate v3.3.1
  • jQuery Struts2 v4.0.3

JSP

<%@ taglib uri="/struts-jquery-tags" prefix="sj" %>  
<sj:datepicker key="document.startDate" size="20" maxlength="20" readonly="true" id="startDate" changeMonth="true" changeYear="true" timepicker="true" showButtonPanel="true" showOn="focus" displayFormat="dd M yy" minDate="-3m +0d" maxDate="+12m +0d" requiredLabel="true" timepickerFormat="HH:mm:ss"/>

Javascript

$('#startDate').datepicker("option", "minDate", new Date("01 Oct 2016"));

Error shown in console:

Error parsing the date/time string: Unexpected literal at position 6

date/time string = 01 Jan 2021

timeFormat = HH:mm:ss

dateFormat = dd M yy

about 4 years ago · Santiago Gelvez
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