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.)
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
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- 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
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