Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

292
Views
Uncaught TypeError: Cannot read properties of null (reading 'className')

I have updated the jQuery version in the application and I am getting an error in the DatePickerComponent with jQuery 3.5.0.here i am getting error on .ClassName; i don't know what to do about it

...
else {
    if (myOwnFormat == 'HH:mm:ss' || myOwnFormat == 'HH:mm') {
        var className = document.getElementById("icon_" + pickerId).className;
        $("#icon_" + pickerId).removeClass(className).addClass("alarm_clock");
    }
    return myOwnFormat;
}

enter image description here

enter image description here

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

document.getElementById("icon_" + pickerId) is returning null and you are trying to get .className from null. This should fix your error.

else {
  if (myOwnFormat == 'HH:mm:ss' || myOwnFormat == 'HH:mm') {
    if(document.getElementById("icon_" + pickerId)) {
       var className = document.getElementById("icon_" + pickerId).className;
       $("#icon_" + pickerId).removeClass(className).addClass("hcm-grid_calar_saat");
    }
  }
  return myOwnFormat;
}
about 4 years ago · Juan Pablo Isaza Report

0

As part of increasing the Security features as part of Spring 22 Release, Salesforce has moved few components to Private API. resulting which this error is being popped-up. Unfortunately this was not mentioned in the release notes, but you can find it in the console with "sfdc-lightning/charts/vbar.js has been deprecated. Please update your code to use lightning-vbar-chart".

The workaround would be using the standard 'Report Chart' component in lightning page.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!