• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

t:inputCalendar doubt

 
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a t:inputCalendar as shown below:




Is there any way by which I can get the string that is entered in the comoponent in the bean?

For ex: if the user selects 04/01/1984 can I get 04/01/1984 as string?

Regards,
Joshua
 
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howzit Joshua,

You can get 04/01/1984 as a java.util.date. The use SimpleDateFormat to get the date as a String...

cheers
Darryl
 
Joshua Antony
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Darryl,

The problem is that user can enter 04/01/1984 or 04/01/84 . If I use simple date format like dd/MM/yyyy then I will get 04/01/1984 irrespective of which two he has entered.

I have used Convertor and fixed the issue.

Regards,
Joshua
 
reply
    Bookmark Topic Watch Topic
  • New Topic