Thursday, July 30, 2009

How to add a calendar icon as date header

dateheadericon From this tutorial, you will be able to add your very own calendar icon to your blogger! If you’re going to show the date on every post, why not do it with a little style and make it a little more appealing to viewers? If you want your calendar icon to appear on every post, read Blogspot Vision’s post on how to do that by clicking here to go to the post. Let’s get started but first and foremost, make sure you back-up your existing template, just in case it doesn’t turn out as expected.

Steps to follow:

1. Login to your Blogger dashboard

2. Go to Layout > Edit HTML (Click on “expand widgets” box)

3. Search for the following section code: ]]></b:skin>
and add the following section code below right before it:

.post .date {
    height: 50px;
    width: 45px;
    background: url( no-repeat;
    font: normal 22px Arial;
    color: #666666;
    text-align: center;
    padding: 0px 2px 0 0;
    line-height: 100%;
    float: left;
.post .date span {
    height: 16px;
    display: block;
    font: normal 11px Arial;
    color: #ffffff;
    text-align: center;
    padding-top: 5px;

4. Next, you will need to search for the following section code: <b:if cond='data:post.title'>
and add the following section code below right after it.

<div CLASS='post'>
<script type='text/javascript'>
    var timestamp = &quot;<data:post.timestamp/>&quot;;
    if (timestamp != &#39;&#39;) {
        var timesplit = timestamp.split(&quot;,&quot;);
        var date_yyyy = timesplit[2];
        var timesplit = timesplit[1].split(&quot; &quot;);
        var date_dd = timesplit[2];
        var date_mmm = timesplit[1].substring(0, 3);
<div CLASS='date'>
<span><script type='text/javascript'>document.write(date_mmm);</script></span>
<script type='text/javascript'>document.write(date_dd);</script>
</div> </div>

5. Preview your page before Saving Template, and if all works fine, Save Template.

Note: You might have to adjust the post title margin and padding to fit your style of blog, you can also find free calendar icons in the icons section!

6. Next, you will need to adjust your settings by clicking Settings > Formatting > Timestamp Format, and adjust it to Sunday, August 02, 2009.

calendariconsettings Your done!

Labels: ,


Anonymous Anonymous said...

wa's happenin yo. site's lookin good

August 03, 2009  
Blogger said...

whats up jon jon. appreciate the support bro

August 04, 2009  
Blogger Admin said...

I need help! I do this and it works great but I need help! The break between posts gets screwed up with the calendar. Look:

On my main blog I removed the break between posts but is there a way to keep the break but not mess it up?

This is my main blog:

August 30, 2009  
Blogger said...

hey admin, it looks like you have a break on top and bottom of posts? what youll need to do is modify the padding of:

.post .date {width: 60px; height: 60px;
background: url( no-repeat;
font: normal 22px Arial;
color: #666666;
text-align: center;
padding: 0px 4px 0 0; <-----
line-height: 100%;
float: left;

next, you will also need to modify post titles.

.post h3 {
background: url( top left no-repeat;
font: bold 20px Arial;
padding: 0px 0px 0px 0px; <------
margin: 0px 0px 0px 0px; <------

let me know if this doesn't work, because then youll need to modify your html section.

August 31, 2009  
Blogger said...

oh i forgot to mention, your post titles may be slightly different.


.post h1,.post h2,.post h3,.post h4,.post h5 ... etc

September 01, 2009  
Blogger said...


September 25, 2009  
Blogger Jess said...

what does it mean when it says "undefined undefined"?

September 29, 2009  
Blogger said...

hey Jess, i think you may have an undefined variable. variables are usually font colors, font texts, or colors of your template that is defined in the variable section of your template(right below your head section). to fix that you have to 1. define your variable or 2. add the actual code of color or text.

for example:
the code you got off a tutorial page might have--

font: $blogDescriptionFont;

you would have to delete the $blogDescriptionFont and replace it with an actual color code, ex. #3b3b3b

September 29, 2009  
Blogger alan said...

hello tried to look it but I can not aparc the calendar on my blog, I created a blog to test the code that is

October 01, 2009  
Anonymous Chris said...

Help please! I added it but look what it does to my blog:

Please help ASAP

October 11, 2009  
Blogger Blogspot Vision said...

my pleasure, be sure to check out the icons section for other calendar icons.

October 23, 2009  
Blogger said...

On my site I have a calendar, but I can't make it so the image doesn't repeat itself when the date is shared with a more recent post... as in... I would prefer the calendar image disappear on earlier posts if they are all on the same day... any idea how I can do that?

To see what I am talking about my site is at:

November 28, 2009  
Blogger Wassini said...


Why after I edited 'Calender Icon' my divider become twice.

Check my blog at

January 12, 2010  
Blogger Blogspot Vision said...

hey wassini, have you checked your posts? or post body? also make sure to check you main widgets section too

January 13, 2010  
Anonymous elsa @ help stop snoring said...

I've been wanting to use this icon for one of my blogs. This works wonders! Thanks a lot :)

August 19, 2010  
Blogger Sassy said...

Hey i really like your site. i've been wanting to improve the look of my blog but i'm ready for wordpress yet! Question I've added the date but how do I get it to come out on the left side of the post/blog as opposed to on top?

January 21, 2011  
Blogger Sassy said...

I meant not ready for wordpress!

January 21, 2011  
Anonymous Tomate Joyeuse said...

I have tried today to implement the add calender but it does not work there is still this "date undefiened"

March 28, 2011  
Blogger sherlina halim said...

Pengen yang lebih seru ...
Ayo kunjungi wwwasianbet77com
Buktikan sendiri ..

Real Play = Real Money

- Referal 5 + 1 % ( seumur hidup ) .
- Cash Back up to 10 % .
- Bonus Royalty Rewards setiap bulan .

untuk Informasi lebih jelasnya silahkan hubungi CS kami :
- YM :
- WHATSAPP : +63 905 213 7234
- WECHAT : asianbet_77
- SMS CENTER : +63 905 209 8162
- PIN BB : 2B4BB06A / 28339A41

Salam Admin ,

June 03, 2015  
Blogger Kanye Co Jamila said...

Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Front end developer learn from Javascript Training in Chennai . or Javascript Training in Chennai. Nowadays JavaScript has tons of job opportunities on various vertical industry. ES6 Training in Chennai

December 14, 2017  

Post a Comment

Subscribe to Post Comments [Atom]

<< Home