Calendar Date - Month greater than 12

UI Components for JSF
Post Reply
edudebom
Posts: 70
Joined: 14 Jan 2011, 18:01
Location: Brazil

16 Feb 2011, 17:48

Hi,

I have a calendar and if i put 14/16/2011 (MM-DD-AAAA) it´s updated to 02/16/2012. The system sum 14 (12 + 2) . How i fix it ?

Code: Select all

 <p:calendar value="#{cadastroPessoasMB.data_reg} />

 import java.util.Date;
private Date data_reg = new Date();
// get and setter

Mojarra 2.1.6; GlassFish 3.1.2.2; PrimeFaces 4.0-SNAPSHOT
Brasil

edudebom
Posts: 70
Joined: 14 Jan 2011, 18:01
Location: Brazil

17 Feb 2011, 12:55

I posted in another java forum about java here in Brazil and other users have the same problem. When I click works. If the user types, the field accepts more than 12 months and upgrade on the date
before sending. It's a bug?
Mojarra 2.1.6; GlassFish 3.1.2.2; PrimeFaces 4.0-SNAPSHOT
Brasil

MikeK
Posts: 104
Joined: 13 Oct 2010, 15:07

17 Feb 2011, 16:26

I had some similar validation issues when manually entering data. I wound up setting readOnlyInputText="true as a workaround but I would prefer to be allow users to type the date if they choose.

http://primefaces.prime.com.tr/forum/vi ... 666#p25666
Prime Faces 6.2
Mojarra 2.2.14
Apache Tomcat 9.0
Internet Explorer 10,11

edudebom
Posts: 70
Joined: 14 Jan 2011, 18:01
Location: Brazil

17 Feb 2011, 17:47

Humm. I prefer to enable manually data too but ok.
Mojarra 2.1.6; GlassFish 3.1.2.2; PrimeFaces 4.0-SNAPSHOT
Brasil

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 23 guests