Q:

Jquery Datepicker function

I'm trying to get the datepicker to work in firefox using JS.
Here is my simple code

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>

<script>
  $(function() {
    $('input[type=date]').datepicker({
      dateFormat: 'yy-mm-dd'
    });
  });
</script>

I keep getting the error that datepicker is not a function. What seems to be wrong?
Kind regards

A:

You need datepicker.js too:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/datepicker/0.5.4/datepicker.js"></script>

<script>
  $(function() {
    $('input[type=date]').datepicker({
      dateFormat: 'yy-mm-dd'
    });
  });
</script>

