Script giving syntax error after; [closed]

2

This script gives error:

<script>
        $(document).ready(function () {
            $('#dataSolicitacao').datepicker({
                format: "DD/MM/yyyy",
                language: "pt-BR",
                minViewMode: 0;
        orientation: auto
    });
  });
</script>

Give semicolon error after line minViewMode: 0; saying missing a key } and then gives error in that last key minViewMode: 0; saying syntax error .

How do I fix this script ?

    
asked by anonymous 01.04.2016 / 13:25

2 answers

6

You have an undue comma within the object initialization. Just change commas and the problem is solved:

<script>
    $(document).ready(function() {
        $('#dataSolicitacao').datepicker({
            format: "DD/MM/yyyy",
            language: "pt-BR",
            minViewMode: 0,
            orientation: auto
        });
    });
</script>
    
01.04.2016 / 13:33
3
<script>
$(document).ready(function () {
    $('#dataSolicitacao').datepicker({
        format: "DD/MM/yyyy",
        language: "pt-BR",
        minViewMode: 0,
        orientation: auto;
    });
});
</script>

The problem is that after minViewMode you were putting a semicolon.

    
01.04.2016 / 13:35