datepicker is not a function in typescript

1

I want to implement datepicker in a typescript project.

I tried to initially install the datepicker by npm but I could not ... so I'm trying the standard way anyway.

I originally imported

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.8.0/css/bootstrap-datepicker.css">
<script src="https://code.jquery.com/jquery-1.12.4.min.js"integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ="
    crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>

Then in the construction of my initial class I initialized the input data variable as a datepicker

this._inputData = $('#data').datetimepicker();

And then I get the message

NegociacaoController.js:6 Uncaught TypeError: $(...).datetimepicker is not a function
at new NegociacaoController (NegociacaoController.js:6)
at app.js:1
    
asked by anonymous 27.10.2018 / 03:24

0 answers