This discussion is archived
1 Reply Latest reply: Nov 23, 2012 4:24 AM by Sudipto Desmukh RSS

Convert RichInputDate to Date object

974835 Explorer
Currently Being Moderated

I'm using af:inputDate in my form.

in my backing bean i'm trying to get the value as Date object.

public RichInputDate getFromDate() {
return fromDate;

public void convert(){
Date fromDt = (Date)this.getFromDate().getValue();

but I get this error:
java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Date

any idea?
is there a simple way to get the value as Date object.



  • Correct Answers - 10 points
  • Helpful Answers - 5 points