Calendar: Value could be either String or java.util.Date (Regression 6.2 > 7.0.RC3)
See original GitHub issue1) Environment
- PrimeFaces version:
- Does it work on the newest released PrimeFaces version? Version? yes
- Does it work on the newest sources in GitHub? (Build by source -> https://github.com/primefaces/primefaces/wiki/Building-From-Source) no
- Application server + version: Jetty
- Affected browsers:
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>
Issue Analytics
- State:
- Created 5 years ago
- Comments:24 (24 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I am currently doing it…
Ok, so i would just do validation for “instanceof Date” for now and note it somewhere.