Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6068363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:42:26+00:00 2026-05-23T09:42:26+00:00

I have a Seam/JSF application that has a date field. When the user types

  • 0

I have a Seam/JSF application that has a date field.

When the user types in 01.01.11, it interprets it to 01.01.0011 which is obviously incorrect. The correct value should have been 01.01.2011

Anyone encountered this? How did you solve it? The xhtml is the following:

<h:inputText value="#{budgetHandler.grantedFrom}">
  <s:convertDateTime type="date" pattern="dd.MM.yyyy"/>
</h:inputText>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T09:42:27+00:00Added an answer on May 23, 2026 at 9:42 am

    It’s not a Y2K problem. It’s just an user error. You asked the user to enter dd.MM.yyyy, but the user entered dd.MM.yy. It’s just represented as last 2 digits of a 4-digit year. The same would happen if the user entered one or three digits as year.

    If you fix your pattern as dd.MM.yy, you’ll see that it works for dd.MM.yy input as you’d expect.

    <s:convertDateTime type="date" pattern="dd.MM.yy"/>
    

    A year of 11 is then interpreted as 2011, not 1911. See, no Y2K problem.

    If you want to allow both date patterns, I’d suggest to create a custom converter which does the job rightly. You can find a kickoff example in my answer of this question: how to validate input date against multiple patterns?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a JSF/Seam web app which has a page with a form which,
In my Seam application, I have a Seam component that returns a ( @Datamodel
I have a JSF 1.2 / Seam 2.2.2 application. I have button and on
We have a rather restrictive architecture where we have a portal-like Seam application which
I'm working on a JBoss seam application (JSF 1.1 and MyFaces Tomahawk) which runs
It is an application that has been built using seam 2.2 and it is
Is there any documentation about introducing jBoss seam to an old Hibernate/JSF project? Have
I'm doing a project in seam that requires restful URLs. I have a view
I'm writing an application using Seam 2.2.x which will be deployed on JBoss 5.1.
I'd like to be able to make an Ajax call using JSF/Seam/RichFaces and have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.