Lauren asked me to show how to add a calendar to dates in blogger and i liked the idea and so i am posting about it. I also want to say that my readers can also contact me via the contact form or twitter (@virtuosoblogger) or even discuss on the facebook page.

The default text for date in blogger might look a little too simple to some, so for those blogger users who want to spice their layout by adding a calendar to their post dates, this post will help you achieve that.

date header in calendar style Replace Date with a cool new calendar type layout in blogger
Preview of the date in calendar style


Follow these steps to replace the default with the date in calendar layout:
1. Go to Settings->Formatting and change the Date Header Format with the format DD-MM-YY
2. Go to layout, then click on Edit Html
3. Download the Full Template (So that you don’t lose any date).
4. Search for the following code:

[xml]
<data:post.dateHeader/>
[/xml]
5. Replace the code above with the following code:
[xml]
<div id="date"><script type="text/javascript">// <![CDATA[
replace_date(&#39;<data:post.dateHeader />&#39;);
// ]]></script></div>
[/xml]
6. Search for the following code:
[xml]
</head>
[/xml]
7. Paste The following code above it:
CSS 3.0
This the CSS code, this governs the look of the calendar. If you know a little bit programming you can make modifications to this code and add your own image.

8. Search for the following code:
[xml]
<body>
[/xml]
9. Just below the code paste the following code:
[java]
<!-date image background–>
<script>
function replace_date(d)
{
var da = d.split(&#39; &#39;);
month = &quot;<div class=’month’>&quot;+da[1].slice(0,3)+&quot;</div>&quot;;
day = &quot;<div class=’day’>&quot;+da[0]+&quot;</div>&quot;;
year = &quot;<div class=’year’>&quot;+da[2]+&quot;</div>&quot;;
document.write(month+day+year);
}
</script>
<!-date image background–>
[/java]
This javascript diaplays the date. You can change the order of display in document.write function.

10. Save the template.
And now your date in calendar style is up and running.

Facing problems? Tell me!!