Reputation: 170
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