1 Reply Latest reply on Nov 23, 2012 12:24 PM by Sudipto Desmukh

    Convert RichInputDate to Date object

    974835
      Hi,

      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.

      Thanks!