How to remove the year from the date in LinkedIn Recommendations

Is there a CSS code to be able to hide the year of the date?

I want to show the date, but only** the day/month**. Not the year.

2 Likes

Hi there, @John-Paul :waving_hand:

We’ve removed the year from the date using this code in the Custom CSS field on the Style tab of your widget’s settings:

.es-review-info-date {
  position: relative;
}

.es-review-info-date:after {
  content: '';
  position: absolute;
  right:0;
  width: 32px;
  height: 100%;
  background-color: rgb(248, 248, 248);
}

.es-tooltip-container {
  display: none;
}

Please check your widget and let me know if it’s fine now :slightly_smiling_face:

2 Likes

That seems to do the job fine, but one weird effect is that on the live page and on mobile too, the second digit is cropped slightly, even though in Elfsight it looks normal.

On this homepage: https://www.theetiquettemethod.com/

2 Likes

Ah, I see!

Our devs will double-check this solution, and I’ll update you once it’s fixed :slightly_smiling_face:

1 Like

We’ve slightly adjusted the code:

.es-review-info-date {
  position: relative;
}

.es-review-info-date:after {
  content: '';
  position: absolute;
  right: -2px;
  width: 32px;
  height: 100%;
  background-color: rgb(248, 248, 248);
}

.es-tooltip-container {
  display: none;
}

In the configurator, there will be a comma displayed after the date, but on your website everything will look fine.

Please check it out and let me know if you like the result :slightly_smiling_face:

1 Like

Same sort of problem persists for some reason :confused:

Here’s the Elfsight view vs the website view.

2 Likes

We’ve added one more CSS code:

.swiper-slide:last-child .es-review-info-date:after {
  right: 0px;
}


Could you please check it and let me know how it looks on your end now?

1 Like

Works well now! Thank you so much.

Regards,

John-Paul

2 Likes

It’s my pleasure :wink:

1 Like