<script type="text/javascript">
    $(document).ready(function() {
        $('#{{ id }}').datepicker({
            format: '{{ format|lower }}',
            language: '{{ app.request.locale }}',
            weekStart: {{ weekstart }},
        });
    });
</script>
<script type="text/javascript">
    $(document).ready(function() {
        $('#{{ id }}').datepicker({
            format: '{{ format|lower }}',
            language: '{{ app.request.locale }}',
            weekStart: {{ weekstart }},
            autoclose: {{ autoclose }},      
        });
    });
</script>
Add ability to autoclose datepicker widget.
Add ability to autoclose datepicker widget.