1

I re-render elements in my page based on a drop down list refer to some types using prime-faces ajax, one of this types is date time as input field, i applied jquery function on it to show date time calendar when clicking, while i change the drop down list value and returned to time type, the input field doesn't show the date time picker as first.. I can say that happens because the jquery function is called only once when document loaded. So i need to re-call it after i change the value of drop down list.

i use this function in my xhtml page to get datetimepicker -and it works-

<script >
//For calendar
$(".datepicker").datetimepicker({
    inline: true,
    showWeek: true,
    firstDay: 1,
    showDay: true,
    timeformate: 'H:I',
});

and i tried this to reload but it doesn't work!

$(document).ready(function({$(".planType").change(function({$(".datepicker").datetimepicker({
inline: true,
showWeek: true,
firstDay: 1,
showDay: true,
timeformate: 'H:I',
})})});      
</script>
May Ahmed
  • 23
  • 3

0 Answers0