title: TypeError: $(...).datetimepicker is not a function
body: <p>I know this question was asked many times before (because I looked here for solution), so excuse me for adding more trash. I'm using <a href="https://tempusdominus.github.io/bootstrap-4/" rel="nofollow noreferrer">this datetime picker</a> and in the console I get error:</p>
  
  <pre><code>TypeError: $(...).datetimepicker is not a function
  </code></pre>
  
  <p>Whole HTML document:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;link rel="stylesheet" type="text/css" href="./css/bootstrap.css"&gt;
      &lt;link rel="stylesheet" type="text/css" href="./css/bootstrap-datetimepicker.css"&gt;
      &lt;link rel="stylesheet" type="text/css" href="./css/fontawesome.css"&gt;
      &lt;link rel="stylesheet" type="text/css" href="./css/style.css"&gt;
      &lt;script src="./js/jquery.js"&gt;&lt;/script&gt;
      &lt;script src="./js/moment.js"&gt;&lt;/script&gt;
      &lt;script src="./js/bootstrap.js"&gt;&lt;/script&gt;
      &lt;script src="./js/bootstrap-datetimepicker.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div class="container"&gt;
      &lt;div class="row"&gt;
          &lt;div class="col-sm-6"&gt;
              &lt;div class="form-group"&gt;
                  &lt;div class="input-group date" id="datetimepicker2" data-target-input="nearest"&gt;
                      &lt;input type="text" class="form-control datetimepicker-input" data-target="#datetimepicker2"/&gt;
                      &lt;div class="input-group-append" data-target="#datetimepicker2" data-toggle="datetimepicker"&gt;
                          &lt;div class="input-group-text"&gt;&lt;i class="fa fa-calendar"&gt;&lt;/i&gt;&lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;script type="text/javascript"&gt;
              $(function () {
                  $('#datetimepicker2').datetimepicker({
                      locale: 'ru'
                  });
              });
          &lt;/script&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I don't think it's the order of loading scripts (as mentioned everywhere else) and I have all the dependencies. What could be the cause of error?</p>