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.

Calendar: Value could be either String or java.util.Date (Regression 6.2 > 7.0.RC3)

See original GitHub issue

1) Environment

2) Expected behavior

On click first calendar should not throw exception. maxdate/mindate

3) Actual behavior

Exception thrown

4) Steps to reproduce

Click first calendar

5) Sample

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:h="http://java.sun.com/jsf/html">

<h:head>
	<title>PrimeFaces Test</title>
</h:head>
<h:body>

	<h:form>

		<p:calendar maxdate="today">
			<p:ajax event="dateSelect" update="@form" />
		</p:calendar>

	</h:form>

</h:body>
</html>

https://github.com/erickdeoliveiraleal/primefaces-test

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
cnsgithubcommented, Mar 12, 2019

I am currently doing it…

1reaction
tandraschkocommented, Mar 12, 2019

Ok, so i would just do validation for “instanceof Date” for now and note it somewhere.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bug in Calendar in combination with LocalTime of JodaTime
This method validates if the value of the Calendar is either a java.lang.String or a java.util.Date. But in this case i have a...
Read more >
java - Getting last day of the month in a given string date
By using getActualMaximum method of java.util.Calendar : String date = "1/13/2012"; SimpleDateFormat dateFormat = new ... Calendar; import java.util.Date ...
Read more >
Date (Java Platform SE 7 ) - Oracle Help Center
It allowed the interpretation of dates as year, month, day, hour, minute, and second values. It also allowed the formatting and parsing of...
Read more >
Guide to java.util.GregorianCalendar - Baeldung
Learn how to use Java's GregorianCalendar class. ... we can initialize the Calendar object either with the default date and time depending ...
Read more >
How to add, subtract days, months, years, hours from Date ...
Positive value passed into add() method will add days into date while negative values will subtract days from date in Java. Similarly Calendar.MONTH...
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