question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PrimeFaces 6.0 Calendar JS Console Error Messages

See original GitHub issue

Hello,

When I enter a date in the p:calendar with mask via keyboard, some JS messages pop in browser console.

Error parsing the date string: Extra/unparsed characters found in date: ___
date string = 15-07-2___
date format = dd-mm-yy
jquery-plugins.js.xhtml?ln=primefaces&v=6.0.1:317 Error parsing the date string: Extra/unparsed characters found in date: ___
date string = 15-07-2___
date format = dd-mm-yy
jquery-plugins.js.xhtml?ln=primefaces&v=6.0.1:317 Error parsing the date string: Extra/unparsed characters found in date: __
date string = 15-07-20__
date format = dd-mm-yy
jquery-plugins.js.xhtml?ln=primefaces&v=6.0.1:317 Error parsing the date string: Extra/unparsed characters found in date: __
date string = 15-07-20__
date format = dd-mm-yy
jquery-plugins.js.xhtml?ln=primefaces&v=6.0.1:317 Error parsing the date string: Extra/unparsed characters found in date: _
date string = 15-07-201_
date format = dd-mm-yy
jquery-plugins.js.xhtml?ln=primefaces&v=6.0.1:317 Error parsing the date string: Extra/unparsed characters found in date: _
date string = 15-07-201_
date format = dd-mm-yy

More info:

PrimeFaces version: 6.0 (I only tested in this version)

Browsers: Chrome 51.0.2704.103 m Firefox 47.0.1

How to reproduce: Enter date via keyboard in a p:calendar with mask

This error can be reproduced in showcase: http://primefaces.org/showcase/ui/input/calendar.xhtml

Enter a date in the “Mask” field.

Problems: Even with these JS error messages, the p:calendar component seems to be working normally (the dates are correctly submitted).

P.S.: I dunno if this situation was reported already, but I searched in the Github issues and PrimeFaces forum, and I could find anything about it, so I’m reporting.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
luiscardozocommented, Feb 7, 2017

I can reproduce it, as @julianomqs said, with a p:calendar on PrimeFaces 6.0, and even in the showcase.

Steps to reproduce:

  1. Go to the PrimeFaces Calendar Showcase
  2. Open the JavaScript console (Ctrl+Shift+J)
  3. Go down to the “Mask:” input field and type a date.
  4. There is no problem when typing month and day. But the warning appears when you start typing the year:

Error parsing the date string: Extra/unparsed characters found in date: ___ date string = 01-01-2___ date format = dd-mm-yy

I can reproduce the errors with

  • Chrome 54.0.2840.100
  • Firefox 47.0
  • Firefox Developer Edition 52.0a2 All of them on an Ubuntu Linux 14.04, 64 bits.

As I understand, it could be a problem in the way that PrimeFaces uses the jquery datepicker

0reactions
amenegottocommented, Sep 15, 2017

Hello, I tested with 6.2-SNAPSHOT cloned right now and the problem does not reproduce anymore.

I was planning a migration from 5.3 to 6.1 but now I will wait until 6.2.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PrimeFaces 6.0 Calendar JS Console Error Messages
Enter a date in the "Mask" field. Problems: Even with these JS error messages, the p:calendar component seems to be working normally (the...
Read more >
Developers - PrimeFaces 6.0 Calendar JS Console Error Messages -
When I enter a date in the p:calendar with mask via keyboard, some JS messages pop in browser console. Error parsing the date...
Read more >
Modified locale message of PrimeFaces is not working
I already check the widget of calendar in web console and the changes is already there. But still it uses the default message....
Read more >
JavaScript and jQuery by Examples
Let's look into an input validation function isNotEmpty() in details. It takes 3 arguments, an input element, an error message, and an error...
Read more >
Primefaces Message, Messages & Growl components ...
Typically, messages used for displaying information, errors, warnings and so on. Primefaces like all of jsf implementations, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found