Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: DatePicker shows error in console

anandbohra pro asked 4 years ago


Expected behavior - Datepicker should appear

Actual behavior Uncaught TypeError: l is undefined

Resources (screenshots, code snippets etc.)enter image description here


Krzysztof Wilk staff commented 4 years ago

Hi!

Could you provide a sample code with your problem (just a date-picker problem) using our snippets, so I can start work with it and recognize the problem? You can find them here: https://mdbootstrap.com/snippets/

Best regards


edwolfe free answered 4 years ago


I'm getting an error also (see below) on the following line when using datpicker version 4.19.1:

$('templatedata .datepicker').each(function() { $(this).datepicker({ altInput: true, altFormat: "F j, Y", dateFormat: "Y-m-d" }); });

Uncaught TypeError: l is undefined
    l picker-date.js:38
    start picker.js:95
    y picker.js:59
    o picker.js:910
    e/o.extend/t.fn[e]/< picker.js:1187
    jQuery 2
    e picker.js:1184
    <anonymous> sadashboard.jsp line 2 > injectedScript:5
    jQuery 2
    <anonymous> sadashboard.jsp line 2 > injectedScript:4
    jQuery 6
    musse WebAPI.js:41
    loadTemplate WebAPI.js:90
    <anonymous> sadashboard.jsp line 2 > injectedScript:3
    jQuery 14
    <anonymous> sadashboard.jsp:892
    jQuery 8
    <anonymous> sadashboard.jsp:891
    jQuery 13
picker-date.js:38:21

edwolfe free commented 4 years ago

I found the problem (my bad). I had the class "datepicker" on the input instead of the div wrapper. My problem is now fixed.


Krzysztof Wilk staff commented 4 years ago

Hi!

I'm glad that you fixed your problem :) If you have more questions or problems - feel free to ask

Best regards



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: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.19.1
  • Device: Laptop
  • Browser: Firefox
  • OS: Windows
  • Provided sample code: No
  • Provided link: No