EnthuDev
EnthuDev

Reputation: 170

Using jQuery Date Picker causes: <f:convertDateTime> Parent not an instance of ValueHolder

I have an bean vacationRequestBean with startdate and enddate fields of java.util.Date type. I am using jQuery Date Picker in my index.xhtml for those fields. Format of the date picker is MM-dd-yyyy.

<script>
   $(function() {
     $("#datepicker").datepicker();
   });
 </script>

<h:inputText id="date" class="datepicker" value="#{vacationRequestBean.startdate}">
    <f:convertDateTime pattern="MM-dd-yyyy" type="date"/>
</h:inputText>
<h:inputText id="date" class="datepicker" value="#{vacationRequestBean.enddate}">
    <f:convertDateTime pattern="MM-dd-yyyy" type="date"/>
</h:inputText>

I get the following error:

<f:convertDateTime> Parent not an instance of ValueHolder

How can I store the selected date picker value?

Upvotes: 1

Views: 2062

Answers (1)

EnthuDev
EnthuDev

Reputation: 170

My issue resolved after removing the <f:convertDateTime>

Upvotes: 1

Related Questions