Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

264
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!