1 Reply Latest reply: Nov 23, 2012 6:24 AM by Sudipto Desmukh RSS

    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!