
Step 1 Select Date Header Format
The first thing we are going to do is select the appropriate Date Header. From the Blogger Dashboard, select the tab labeled, "Settings," and from there the subcategory "Formatting." For the "Date Header Format" choose the option that reads "DD Month YYYY," with no commas. Figure 1.1 shows us are selecting, "28 October 2010" as our "Date Header." Once the correct Date Header format is selected, scroll to the bottom of the page and select "Save Settings."
Figure 1.1
Step 2 Editing HTML
Now we are going to do a little editing within the code. So from the Dashboard again, select the tab labeled, "Design," and from there the subcategory "Edit HTML." It's a good idea at this point to click the "Download Full Template," link in case you would like to go back or make any mistakes.
Check the "Expand Widget Templates" box. When editing the code, it is recommended that the contents of the HTML be copied from the Dashboard and then pasted into a separate text editor such as notepad, where a "Find" feature could be utilized.
Step 3 Adding The Script
The first modification to the code will be to add the small bit of JavaScript shown in the box below. Copy and paste that script in your template code, just after
</head>
<script>
function replace_date(d)
{
var da = d.split(' ');
month = "<div class='month'>"+da[1].slice(0,3)+"</div>";
day = "<div class='day'>"+da[0]+"</div>";
year = "<div class='year'>"+da[2]+"</div>";
document.write(month+day+year);
}
</script>
Step 4 Replacing Date Header
Use your text editor's "Find" feature to search for the existing date header code in your template. To do this search for this in your code:
<data:post.dateHeader/>
And replace it with our relevant date header script below:
<div id='date'>
<script> replace_date('<data:post.dateHeader/>');
</script>
</div>
Step 5 Choose Calendar Image
Once you have selected the image you would like to use for your post date calendar, upload it to your image host and copy it's URL
Step 6 Adding the CSS
Paste your image URL in the following CSS where it says YOUR IMAGE URL. Then copy and paste the entire CSS code that follows into your template HTML before
]]></b:skin>
#date{ background-image:url(YOUR IMAGE URL);
background-repeat:no-repeat;
height:50px;
width:50px;
margin:0 10px 0 -60px;
text-transform:uppercase;
text-align:center;
letter-spacing:2px;
line-height:1em;
float: left;
overflow:visible;}
.day{ line-height:2em;
font: normal bold 22px Arial, Tahoma, Helvetica, FreeSans, sans-serif;
padding-top:3px;
color:#606060;}
.month{ line-height:1em;
font: normal normal 12px Arial, Tahoma, Helvetica, FreeSans, sans-serif;
padding-top:3px;
color:#ffffff;}
.year{ display:none;}
All the areas of CSS shown in "pink" can be changed to suit your needs, and even more areas can be changed if you really feel like getting crafty with it.
Step 7 Preview & Save
Once you have completed all the previous steps, copy the contents from your text editor and return to the Dashboard HTML editor. Select all the text there and paste your your modified code from the text editor. Preview your template and "fingers crossed" everything looks right, and then save. Figure 2 shows how ours looked.
Figure 2

Because each template is different, sometimes the margin and padding of certain elements will need to be adjusted accordingly. We hope you like these free mini calendar icons and tutorial. Also, there is one drawback, when using this script, posts sharing the same date will display a blank date. To solve this, make sure to use the "Post Options" dialogue box when posting multiple entries per day, and select a different date for each.
33 comments:
Simple but effective calendar icons, really love these!
@ips2009,
Thanks so much, we are glad to hear it. We plan on many more freebies in the near future as well.
gr8 article, bookmarked
Thanks Klodian, so glad you stopped by. BellaTYPE is still in it's infancy and has a long way to go still, we hope that you will continue to visit us as we grow.
<3
Yes sure Lauren, I used on one of my templates this tutorial
http://www.deluxetemplates.net/2010/11/magnum-blog-blogger-template.html
Oh I am so glad that you were able to follow it and that more importantly, it worked!
But I realize now that I FORGOT on line of CSS! This is my first tutorial, clearly I need to pay more attention in the future!
The missing bit of CSS is
.year {display:none;}
This hides the year as it does not fit in the calendar icon as I have it written. But for those who do want the year to display, simple changes to the margin and padding of elements would allow the year to fit in the icon.
I will add the missing code to the post.
Thanks again Klodian, I am glad the tutorial worked for you and honored that you used it in a template.
Lauren,
Pls update the download link, we cant download the icons :/
@Klodian,
I am sorry about that. Mydatanest.cmo has some great features, really the best for a free file host but they are just so unreliable. I have updated the download link so it should work now.
thanks for the tutorial. Really helping me. Not like other site that give non-working tutorial.....
@Insan yg mencari Maqamul Amin
You are very welcome, I am glad the tutorial worked for you.
Oh this is cool. I'm super excited about your new site.
Also, have you considered putting blogger templates up on Themeforest Blogger section? There is a serious lack of blogger goodies over there. :)
sorry . but i dun understand the step no 7 .
"Once you have completed all the previous steps, copy the contents from your text editor and return to the Dashboard HTML editor. Select all the text there and paste your your modified code from the text editor. Preview your template and "fingers crossed" everything looks right, and then save."
can u please help me ??
sorry sorry .
already understand (;
but can i share this ?
i'll credit you (;
@♀ syera teli ♀ - I am glad you were able to understand my directions and get this to work. Yes you may share this.
@starsunflowerstudio - I have been thinking about themeforest. Maybe I will, we'll see, thanks!
hi bella, TQVVVM for your tuts!
been cracking my head all day figuring the 'codes' from other blogs *they've also managed to make my contents disappeared. LOL*
thanks again n i hope i do have ur permission to share this, n of course u'll be credited :)
@Ms. P
Glad you liked this tutorial, yes you may share it. Stay tuned for more!
I have used this several times now and love it! One thing...when you click "older posts" to go back, the date doesn't show up and there's just a blank icon. Any advice? THANKS!
This is a great post! And just an FYI for anyone who uses this code: if it looks like the code didn't work - check this code:
margin:0 10px 0 -60px;
More specifically, change the -60px to something like 0 or 0px. I changed mine to 0px and now the calendar shows up.
Thanks so much for this post!
must take out -60 and custom fonts for the date for it to work.
Thank you so much for this. I included a link back to you on my blog.
I love this idea! Thanks for sharing and your downloads rock.
I'm hoping you can help me figure out one detail though.
I have the calendar icon showing but it's above my post title.
Can you help me figure out what I did or can do to make them be on the same line as each other?
Thanks in advance!
Nevermind... I figured it out :)
when I do this in my test blog it works but when I do it in my book blog, the one I want it in it doesn't work, everything goes wacky. Does this have something to do with the template I'm using?
Mariya, I am not sure what the problem is. What template are you using and can you describe how it goes wacky, I will try to help if I can.
that's okay. I am redesigning my blog and the template I'm working with allows the calendar icon to work. I was using the picture template before and what happened was all the widget side bar stuff went to the bottom of my blog and blew up, like supper big, but since I'm using a different layout it's working fine now.
I have a question, are there other calendar icons besides the zip file ones included in the tutorial? Like I really like the calendar icon you are using. Is that one avaiable?
hye.. i am using Minima templates, i tried this tutorials but ntg changes, sigh... dis i miss anything?
I cant find it doesnt exist I use the Simple Template , what should i do ?
Great tutorial, really! I would love to add this calendar icon on my blog too but I am using a minima template and this is not working for me... I can add the calendar icon and move the date to the left where I want it to be... but no way I can customize day, month and year individually... Any idea how can I sort this out? Thanks!!!!
Great tutorial. Looks just like in wanted after setting the month font style also to "bold".
See result at http://indexswingtrader.blogspot.com/
Thanks!
Also using a version of Minima, and this didn't work for me....HELP! :)
how to make the date inside the post?
I just tried this but for some reason the image won't show
Great tutorial, unfortunately its no working in minima template. Hope you will fix it soon.
Post a Comment