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.
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.
Hi there, @John-Paul ![]()
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 ![]()
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/
Ah, I see!
Our devs will double-check this solution, and I’ll update you once it’s fixed ![]()
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 ![]()
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?
Works well now! Thank you so much.
Regards,
John-Paul
It’s my pleasure ![]()