I have a jsf page named as page.xhtml like following:
<p:calendar id="start_date_time_label" widgetVar="myCalendar1"
value="#{bean.startDateTime}" pattern="dd/MM/yy"
style="width: 359px; " required="true"
requiredMessage="Start Date is mandatory" />
Here I have added one javascript function like following to restrict the minimum date value:
<script type="text/javascript">
jQuery(document).ready(function(){
myCalendar1.jqEl.datepicker("option", "minDate", -365);//set minDate to 1 year back
});
</script>
Till now the script is working fine.
Now as per requirement I have to change the pattern of p:calender tag to pattern="dd/MM/yy HH:mm:ss". But then the script is not working. Please help me to make it work with the time value.