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.

DatePicker: Month-Picker with manual input throws JS error

See original GitHub issue

Describe the bug

A manually entered year-month in the Month-Picker will produce JS error while typing:

image

Reproducer

Showcase: https://www.primefaces.org/showcase/ui/input/datepicker/datePickerJava8.xhtml?jfwid=3145d

Open the web console.

Start typing in the input for Month Picker (java.time.YearMonth). The expected format is MM/YYYY. As long as the month is not “fully” entered, each key press will produce a JS error.

Expected behavior

No JS error should be thrown

PrimeFaces edition

Community

PrimeFaces version

11.0.0

Theme

No response

JSF implementation

Mojarra

JSF version

2.1.19

Browser(s)

Chrome Edge 101.0.1210.53

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mellowarecommented, Jun 2, 2022

I have confirmed the issue is in 12.0 and the fix works as suggested

0reactions
mellowarecommented, Jun 2, 2022

Thanks for reporting i will merge this today.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is jqueryUI datepicker throwing an error? - Stack Overflow
jQuery documentation says you can call the datepicker by this command: $("#datepicker").datepicker();. If you click the 'view source' button ...
Read more >
Crash on clear time input value · Issue #1670 - GitHub
Open DatePicker popup Click on the clear button in the time input (or enter invalid value use 'delete' or 'backspace' buttons)
Read more >
Datepicker in Angular using mat-datepicker | Material Design
To implement date picker in Angular we can use angular material datepicker ... But user can able to type the dates manually in...
Read more >
Datepicker - Angular Material
This error is thrown if more than one <input> tries to claim ownership over the same <mat-datepicker> (via the matDatepicker attribute on the...
Read more >
Creating a Native HTML 5 Datepicker with a Fallback to ...
Using the native datepickers is easy, just change the type attribute of your date inputs from text to date . <!-- Before -->...
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