Topic: datepicker MDB-Pro_4.17.0 does not work
Davin Chace asked 5 years ago
Expected behavior: This example is presented in the form section for datepicker. When you click on the calendar icon, a calendar picker is supposed to open.
<div id="date-picker-example" class="md-form md-outline input-with-post-icon datepicker" inline="true">
<input placeholder="Select date" type="text" id="example" class="form-control">
<label for="example">Try me...</label>
<i class="fas fa-calendar input-prefix"></i>
</div>
.....
$('.datepicker').datepicker({
inline: true
});
Actual behavior: Nothing happens when pressing the calendar icon. I've also tried pasting the above javascript in the Chrome console and get the following error:
Uncaught TypeError: Cannot read property 'value' of undefined picker-date.js:38
Resources (screenshots, code snippets etc.): Here is my header tags showing the following imports:
<head>
<meta charset="UTF-8">
<title>{% block title %}Finance Ninja{% endblock %}</title>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.11.2/css/all.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap">
<link rel="stylesheet" href="{{ url_for('main.static', filename='MDB-Pro_4.17.0/css/bootstrap.min.css') }}">
<link rel="stylesheet" href="{{ url_for('main.static', filename='MDB-Pro_4.17.0/css/mdb.min.css') }}">
<link rel="stylesheet" href="{{ url_for('main.static', filename='MDB-Pro_4.17.0/css/style.css') }}">
<script type="text/javascript" src="{{ url_for('main.static', filename='MDB-Pro_4.17.0/js/jquery.min.js') }}"></script>
<script type="text/javascript" src="{{ url_for('main.static', filename='MDB-Pro_4.17.0/js/popper.min.js') }}"></script>
<script type="text/javascript" src="{{ url_for('main.static', filename='MDB-Pro_4.17.0/js/bootstrap.min.js') }}"></script>
<script type="text/javascript" src="{{ url_for('main.static', filename='MDB-Pro_4.17.0/js/mdb.min.js') }}"></script>
<script type="text/javascript" src="{{ url_for('main.static', filename='MDB-Pro_4.17.0/js/modules/material-select/material-select.min.js') }}"></script>
What am I missing that is preventing this from working?
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Open
- User: Free
- Premium support: No
- Technology: MDB jQuery
- MDB Version: 4.17.0
- Device: Mac
- Browser: Chrome
- OS: Mac OS
- Provided sample code: No
- Provided link: No
Grzegorz Bujański staff commented 5 years ago
Hi. We added this functionality in version 4.18.0.