Using Date Picker

web
mobile

pro asked 3 years ago

Hello, I need your help to add the date picket in my website. These are the steps i'have already done : 1) add the code in my HTML/PHP page
<div class="md-form">
    <input placeholder="Selected date" type="text" id="date-picker-example" class="form-control datepicker">
    <label for="date-picker-example">Try me...</label>
</div>
But i stopped there because i just don't uderstand where the initialization code should be write in .. $('.datepicker').pickadate(); Please help me Regards Corentin

pro answered 3 years ago

found it ! thanks :)

4mjoncas answered 3 months ago

I have the same problem... can you share you solution?


Mateusz Łubianka staff answered 2 months ago

Hi,

The initialization code should be write in <script></script> just before closing body tag or in your custom js file. For example:

<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/popper.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/mdb.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
// Data Picker Initialization
$('.datepicker').pickadate();
});
</script>
</body>

Best,


Please insert min. 20 characters.
Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No