Topic: Datepicker issues with 4.19.2 gulp

frzeekoei premium asked 2 years ago


Expected behavior Datepicker initialized.

Actual behavior Datepicker is not initialized after using gulp to generate custom .js files or using the compiled files that come with the download. However, it does work when using the generic 4.19.1 mdb.js. The files sizes are also different from the generic and gulp versions.

Resources (screenshots, code snippets etc.)

 <!-- JQuery -->
<script type="text/javascript" src="../dist/js/jquery-3.4.1.min.js"></script>
<!-- Bootstrap tooltips -->
<script type="text/javascript" src="../dist/js/popper.min.js"></script>
<!-- Bootstrap core JavaScript --> 
<script type="text/javascript" src="../dist/js/bootstrap.min.js"></script>
<!-- MDB core JavaScript -->
<script type="text/javascript" src="../dist/js/mdb.js"></script>

enter image description hereenter image description here


frzeekoei premium answered 2 years ago


Ah ok, is there any way to use the updated datepicker? It is just better overall and is one of the reasons we paid for MDB pro. I could find no info that mentions the gulp version being limited to the old datepicker?


Marcin Luczak staff commented 2 years ago

I've checked the package once again and you can use the updated datepicker by adding :'./js/dist/pro/picker.js','./js/dist/pro/picker-date.js','./js/dist/pro/picker-time.js',

to the js/modules.js file and run gulp js-build once again. Somehow they are not exported by default.


frzeekoei premium commented 2 years ago

Thanks so much that did the trick!


Marcin Luczak staff commented 2 years ago

I'm glad that it helped :)

Keep coding, Marcin


Marcin Luczak staff answered 2 years ago


Hi,

Gulp package uses this Datepicker https://mdbootstrap.com/docs/b4/jquery/forms/date-picker1/ which should be initialized via $(...).pickadate() function instead of $(...).datepicker(). I'm sorry for this confusion, we'll try to explain this change internally.

Keep coding, Marcin



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Resolved

Specification of the issue

  • ForumUser: Premium
  • Premium support: Yes
  • Technology: MDB jQuery
  • MDB Version: MDB4 4.19.2
  • Device: PC
  • Browser: Crome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No