Topic: Datepicker usage in Free Version

iec.ankit@gmail.com free asked 5 years ago


I want to use date picker in mdb free, but getting error pickadate is not function

<!--Grid column-->
<div class="col-md-6 mb-4">

  <div class="md-form">
    <!--The "from" Date Picker -->
    <input placeholder="Selected starting date" type="text" id="startingDate" class="form-control datepicker">
    <label for="startingDate">start</label>
  </div>

</div>
<!--Grid column-->

<!--Grid column-->
<div class="col-md-6 mb-4">

  <div class="md-form">
    <!--The "to" Date Picker -->
    <input placeholder="Selected ending date" type="text" id="endingDate" class="form-control datepicker">
    <label for="endingDate">end</label>
  </div>

</div>
<!--Grid column-->

<script type="text/javascript">
$(document).ready(function () {
  // Get the elements

var from_input = $('#startingDate').pickadate(), from_picker = from_input.pickadate('picker') var to_input = $('#endingDate').pickadate(), to_picker = to_input.pickadate('picker')

// Check if there’s a “from” or “to” date to start with and if so, set their appropriate properties. if (from_picker.get('value')) { to_picker.set('min', from_picker.get('select')) } if (to_picker.get('value')) { from_picker.set('max', to_picker.get('select')) }

// Apply event listeners in case of setting new “from” / “to” limits to have them update on the other end. If ‘clear’ button is pressed, reset the value. from_picker.on('set', function (event) { if (event.select) { to_picker.set('min', from_picker.get('select')) } else if ('clear' in event) { to_picker.set('min', false) } }) to_picker.on('set', function (event) { if (event.select) { from_picker.set('max', to_picker.get('select')) } else if ('clear' in event) { from_picker.set('max', false) } }) });



Datepicker is a premium component which isn't available in MDB Free



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.9.0
  • Device: Laptop
  • Browser: Chrome
  • OS: Linux
  • Provided sample code: No
  • Provided link: No