A tiny cute SharePoint calendar (Part II)

In part I, we saw how to adjust the size of an empty SharePoint month calendar to fit in the right column of our home page. Now our next step is to display the events.

As you can expect, the default display will be too big for our tiny calendar. So here are two tricks to work around this issue.

Method 1: no title display

In SharePoint 2007, you can choose which column to display in the month view. So let’s create an additional column:
- name: “Display”
- required: yes
- default value: “*”

In the view settings, choose [Display] as month view title. The result: for each event, SharePoint will display a simple “*” that will fit into the day cell.

This works fine, but the user has to click on the item to actually see the event. This may be an issue, especially if several events happen on the same day.

Method 2: shrink the title

So another option is to keep the title and use some CSS magic. Here is the deal: a title will be displayed in small fonts by default (unreadable), but will get back to normal size when the user hovers over it (see the screenshot at the beginning of this post).
To achieve this we’ll just add a few rules to the CSS from part I:

<style type="text/css">

/* Tiny Calendar */
/* Christophe@PathToSharePoint.com */

/* Remove week blocks */
.ms-cal-weekempty {display:none;}
.ms-cal-week {display:none;}
.ms-cal-weekB {display:none;}
.ms-cal-weekB {display:none;}
/* Shrink cells */
.ms-cal-workitem2B {display:none;}
.ms-cal-noworkitem2B {display:none;}
.ms-cal-nodataBtm2 {display:none;}
.ms-cal-todayitem2B {display:none;}
.ms-cal-workitem {font-size:0px;}
.ms-cal-muworkitem {font-size:0px;}
.ms-cal-noworkitem {font-size:0px;}
.ms-cal-nodataMid {font-size:0px;}
.ms-cal-todayitem {font-size:0px;}
/* thin out header */
.ms-cal-nav {display:none;}
.ms-cal-nav-buttonsltr {display:none;}
.ms-cal-navheader {padding:0px;spacing:0px;}
.ms-calheader IMG {width:15px;}
/* Abbreviate weekdays */
.ms-cal-weekday {letter-spacing:6px; width:22px; overflow: hidden;}
/* events display */
.ms-cal-defaultbgcolor {padding:0;}
.ms-cal-defaultbgcolor a {font-size:3px;}
.ms-cal-monthitem a {font-size:3px;}
.ms-cal-monthitem a:hover {font-size:10px;}
</style>

This second method is more user-friendly, if your titles are not too long.

There are of course many variations around these two methods, here are for example some other text adjustments you can use:

http://www.w3schools.com/Css/css_text.asp

And remember: all of this was done using CSS only, no harm was done to the structure itself. The SharePoint calendar remains fully operational (recurring events, alerts, filters, etc.).

About these ads

140 thoughts on “A tiny cute SharePoint calendar (Part II)

  1. Cristophe!

    You are simply on fire!
    Your straightforward introductions, and bite-sized approach to introducing CEWP and CSS features are outstanding! I hope you quickly rise to the top of any peer rating for WSS resources!!!!

    This particular feature on Calendar webpart is something that’s been bugging me since the V3 intro, (and now there is an astoundingly simple solution!) Well done!

    -Dan

  2. Is there anyway an “Alt” like tag can be implemented? When someone hovers over the event, a message would appear rather than expanding the calendar cell size.

  3. With SharePoint 2007, we have lost this “Alt” behavior that was available on the 2003 version.
    We could modify the HTML to insert the alt attribute, but then the solution would be heavier – not CSS only – and maybe not worth the effort.
    Another option is to use positioning. As a test, try adding this line to my CSS:
    .ms-cal-defaultbgcolorsel {position:absolute;}
    If I can come up with a clean and cross-browser solution, I’ll publish it.

  4. Waht does that piece of code do? I’ve applied it and it doesn’t seem to do anything.

    Another idea would be to display this in another webpart, but that may clutter things on the screen.

  5. Paul, with the additional line, the text of an all day event will expand when you hover over it, without expanding the cell size. This is just an example of what can be done using positioning.

  6. Have you found any way to do this same behavior with other events, not just All Day ones? I’ve tried using all the calendar elements I could find, and no luck.

  7. For events with a start time, replace:
    .ms-cal-monthitem a:hover {font-size:10px;}
    with:
    .ms-cal-monthitem a:hover {position:absolute;font-size:10px;}

    There are many variations around this, but I have yet to find a clean cross-browser one. If you don’t like the expanding cells, the two lines of CSS I have provided in the comments are an alternate option.

  8. Wow!! Some really innovative content you’ve got published here. Thanks for taking the time to share it with us mere mortals. I’ve learned a lot on this blog. Thanks again and keep up the great work!!

    Greg O

  9. Christophe, this is great! I use the calendar web part for my team meetings because it shows all events, both recurring and individually set meetings.

    Is there a way to alter the css to remove the weekends? I only need the weekdays for this particular calendar.

    Thanks!

  10. Cristophe

    This is Great. One question I have is if there are more than two events in a single day on a calendar the x More Items with expand button appears. Is there a way to shrink that as well?

    Awesome stuff.

  11. Pingback: No assembly required « Path to SharePoint

  12. Pingback: Sneak peek: colored calendar « Path to SharePoint

  13. Pingback: How to scale down the SharePoint Gantt view « Path to SharePoint

  14. Pingback: Live demo: holiday calendar « Path to SharePoint

  15. Chris, I tried the code in the page you linked to and it didn’t work. Then I read the comments section and saw that somebody (“CodePirate”) had already reported the issue.

  16. Pingback: Calendar - Weekdays only « Path to SharePoint

  17. Hi Christophe

    Is there a way to get a calendar item to link to a specific URL (if I have a URL column in my list) when you click on it instead of to the default view of the list item?

  18. Is there a way to make the calendar smaller in the same way that you make the gnatt view so much cleaner. (BTW – thank you for the gnatt code – it really made it much easier to view my project release dates!)

  19. Thanks! This code works great!
    - For better viewing of appointments with time I added that background-color is set to white and a border.

  20. i am using calander to list all the training dates. my problem is – if the traning goes for two days suppose march 21 and 22. the calander displays in both 21 and 22 column . sometime same user click on both day and register twice for same training.

    so how do i display the registration information only on 21 ?

    or is there any way to disable the link on 2nd date so that the dont get registration form when they click on 22?

    Thanks

    hari

  21. Hi Christope

    I am new to sharepoint. i have another problem now. when i set begin and end date to start date, it displays in one cloumn. however it lists two links in same column for same training . i just wanted to display only one link. How do i do that?

    Hari

  22. Hi Christophe

    I was trying to solve this problem for long time. but i am still not able to do this. here is my problem

    i have a need to hide TO EVERYTHING from the list form webpart toolbar items EXCEPT “Export Event” which i did through the javascript and content editor web part.

    but the main problem is it hides the toolbar for everyone. what i need is-i want to hide /show the toolbar items according to USER ROLE. for example if the user is administrator i don’t wanna hide anything. how do i do THAT? if you could give me resources or code sample then that will be great.

    thanks

    Hari

  23. Hi Christohpe,

    How can I display a SharePoint calendar on another sub-site or page within SharePoint? Eg: A master calendar & a slave calendar (which reads of the master calendar).

    For eg: I have a calendar (in the calendar view on a site), now I want to display the contents of this calendar on another page (also as a calendar view with your shrink code).

    I tried chaning the slave calendar link in the Advanced option section under Modify Shared webpart, making it point to the master calendar.

    However if I add anything on the master calendar it does not show up on the slave calendar…?

    Hope this makes sense.

    Thanks,
    Sujit.

  24. Hi,
    Amazing article.It really helped me. Thnx…!!

    I need to display some other’s calender on my homepage. Can you please advice me on this?

  25. Hi Christophe,

    Thanks for your reply.

    OK, here’s my scenario again -

    Say I have two sites, Site A and Site B. I create a Calendar in Site A to record events, etc. Now how do I display the contents (events, etc. recorded) of the Calendar in Site A on Site B.

    So, basically what I’m trying to do is display Site A’s Calendar in Site B as well (i.e. Site B’s calendar reads off Site A’s calendar). Is this possible?

    Please let me know if I still don’t make any sense.

    Thanks heaps.

    Best regards,
    Sujit.

  26. Christophe –

    Basically B’s calendar should read the contents off A’s calendar.

    For eg: If I book a new event in calendar A, then calendar B should show it too (i.e. calendar B is always synchronized with calendar A). However it should not be true the other way round… Calendar B should always be Read-Only and should be just used for viewing (calendar A’s contents).

    Please let me know if anything is unclear.

    Thanks mate!

  27. Well, you could use a workflow that automatically pushes the content from A to B.
    But I don’t understand your purpose. If B just replicates A’s content, then why not display A directly?

  28. Hi Christophe -

    It’s like say we have 2 sites, one for public viewing (Site1 – read only) & the other one say just for managers (Site2 – restricted access). No we would like to display Site2′s calendar on Site1.

    So we want to expose ONLY the calendar of Site2 in a read-only mode on Site1 for public viewing.

    Thanks.

  29. Heylosss Christophe …

    I am sorry for replying late.
    What i need is somewhat similar what sujit is talking bout. To be more precise, there is a site on who’s homepage i need to display some one else calendar. Say, for eg, ‘yours’ calendar on the homepage of that site, so that every1 can c ur calendar.

    I hope this time I am bit clear… :)

  30. Thanks for providing this CSS for all of us to use – it’s always a pain to figure out what css needs to be modified in MOSS.

    A quick change though, is that you have:
    .ms-cal-defaultbgcolor {padding:0;}

    When it should be:
    .ms-cal-defaultbgcolor, .ms-cal-defaultbgcolorsel {padding:0;}

    When an event is set to ‘full day’ the defaulbgcolorsel is used when the mouse is over. If the padding isn’t applied to it, then you get more padding than you want on mouse-over.

  31. Christophe,

    regarding Paul’s post (October 15, 2008 at 7:41 pm) and your response

    I find that adding this line of code helps greatly but when the event text enlarges when you hover over it, the cell doesnt change with it. Is it possible to do this.

    My real problem is that without the
    .ms-cal-monthitem a:hover {position:absolute;font-size:10px;}
    line the event jumps all over the place and is hard to hover over and read.
    with this line of code it is stable but unreadable as it appears over the rest of the calendar.

    Any help would be appreciated.

    *I have to say your site is amazing, the company I am working for dont see to have any manuals for SharePoint. So I have to just fumble my way around but it the last few weeks my life has been made much easier. Thank you for your effort.*

    • Hi Christophe,

      first to echo a thanks for your blog – the mini cal is great. The burning question that I have is: when the mini cal is part of a page layout, how do you avoid having to load the txt file in the CEWP every time you create a new page based on the page layout? I guess that this is due to the fact the CEWP only has relative links. Any thoughts? Thanks.

      • Katie: here are a couple options if you need to reuse a script or style:
        - save it in a separate text file, and link each CEWP to it.
        - save the CEWP as Web Part template, then you can easily add it to new pages you create.
        - include the script or style in the Master page of your site.

  32. Thanks for the suggestions Christophe. I am sure they work, but I am just not sure how. I understand and can do the first suggestion of course, but I am trying to avoid the manual intervention.

    And may I ask how you save the CEWP as a template.??

    I put the CEWP (with mini cal text file attached to it) on the Master page (at the bottom), but the mini cal on a separate page doesn’t transform into its beautiful self.

    Cheers.

  33. Thanks for weeding through all of that CSS, Christophe. After I popped that in to a CEWP, I wanted to get the links to forward to the actual list instead of opening in the same WebPart Zone. I played around with some JavaScript and came up with this.

    function CalLinkForward(){
    var aForward=document.getElementsByTagName(‘a’);
    for(var i=0;i<aForward.length;i++){
    if (aForward[i].href.match(/javascript:MoveToViewDate\(\’([^\\]+)\\u002f([^\\]+)\\u002f([^']+)\’,\’Day\’\);/)) {
    var scan = /javascript:MoveToViewDate\(\’([^\\]+)\\u002f([^\\]+)\\u002f([^']+)\’,\’Day\’\);/;
    var getDates = aForward[i].href;
    var result = getDates.match(scan);
    var returnedDate = result[1] +’/’+ result[2] +’/’+ result[3];
    aForward[i].href = ‘Lists\/Calendar\/calendar.aspx?CalendarDate=’ + returnedDate + ‘&CalendarPeriod=Day’;
    //aForward[i].parentNode.parentNode.onclick = function(){window.location=’Lists\/Calendar\/calendar.aspx?CalendarDate=’ + returnedDate + ‘&CalendarPeriod=Day’;};
    //The above commented line was an attempt to change the onclick even of the TD tags. It really should work like I’ve written it, but it doesn’t. Believe me I tried http://codingforums.com/showthread.php?t=166040. Until someone can solve that issue, I am simply turning the onclick events off with the line below.
    aForward[i].parentNode.parentNode.onclick = ”;

    }
    }
    }

    It’s not perfect (see commented lines), but it does the job. I though tI would post it here, and see if you or anyone else could take it the rest of the way. Thanks again for this useful solution.

  34. Oh, and you need to remember to call the function with a line like the following:

    _spBodyOnLoadFunctionNames.push(“CalLinkForward”);

  35. Christophe – WOW is my team happy!!! WOOOTNESSSSSS!!!!
    Thank you again! Your name will live on in the code ;-).

  36. Pingback: An experiment: tiny calendar + jQuery zoom « Path to SharePoint

  37. Many thanks for this – one issue, and it isn’t with you CSS, but is common to the OUt of the Box CSS is that is breaks when used in “Black Band Master” – or in our case a master page derived from it.

    Or rather it does in IE7 – FireFox is fine – The days with events have the base line shifted over a few px – I’m sure with investigating I can sort it, but if you’ve already got a fix it would be great.

    I’m amazed MS don’t test their CSS in the other Master pages – I had similar issues with gantt charts.

    Cheers

    Chris

  38. Amazing!!! You’re EasyTabs and Calendar magic have helped me tremendously – plus being able to use your css code to learn what can be done further. Mucho thanks and I hope to meet you one day and buy you the beverage, that I can afford, of your choice. I’m hoping to put the money together for the EUSP Accordian/EasyTabs workshop. Keep up the excellen work!

  39. Thanks for your reply! Ok so I got the calendar loaded and it is working.

    Here is a question as well: what if I just wanted the ‘dates’ showing on a calendar and then I click the date and it only pulls up events happening on that date or available until that date?

    Like on the outlook version calendar is what I hope to make eventually now!

  40. Hi,

    is there any way to display the tool tip in sharepoint default calendar? Like once the mouse over on any event the title should display in the tool tip?

    Thanks
    Amit

  41. Thanks so much for this great functionality and it was very easy to implement and customize for our needs. I was interested in removing the weekends from the mini calendar and saw a few comments saying you were going to post a way to do that. Did you come up with a way to do this?

  42. Hi Christphe,

    Beautiful code, works great, but when i try it on my hebrew site I cannot get the height smaller.

    Any help would be appreciated.

    Thank you,
    Rivka

  43. Pingback: My SharePoint Saturday KC 2009 Notes « SeanE Talks Tech

  44. I second everyone else’s kudos for the nice code and work you’ve put in. I’m a relative newbie to CSS and Sharepoint. Do you have any suggestions on adding a whole year view of the calendar?

  45. Thanks for this cool stuff on your page ;)

    i’m searching for a way, to tiny the weekview. i want to tiny the hours and the weekdays with css.
    can you pls tell me, how the line of code is to tiny the row with the hours on the weekview?

    thx
    Michael

  46. Hello, calendar people and of course Christophe, calendar god! When I add actual events to my calendar, it won’t let me include links within the event descriptions — just straight text. Has anyone else run into this? how can I fix it?

  47. Hello Christophe -

    I am using method 2 for the Tiny Calendar, however I am wondering if there is any way to change the colour of the small titles that get displayed on the calendar?

    By default the title gets displayed in blue or using the default Sharepoint colour coding… how can we customise this?

    For eg: On the calendar screenshot that you have posted on this page, can I customise the colour of the title “Halloween” (for 31 Dec 2008)?

    Many thanks,
    Sujit.

  48. WOW!
    that was the best post i have seen in years, so easy and straightforward that nothing can go wrong!!
    keep the great job

  49. Hi Christophe,

    I am using your tiny calendar css script (method 2). Thank you so much! Wondering since you seem to be the foremost expert on SharePoint calendars if you have any ideas on how to force the the calendar item link to open in a new window or do a jQuery like hover with only using CEWP (no system level/backend/xml edits). Basically I want to remove or replace the target=”_self” behavior for calendar list items on a webpart page.

    I have tried almost every solution I can find on the web (mostly JavaScript via CEWP), but none of them work as expected.

    I know a very odd question, but I am using this calendar as a static list (in the calendar view) for internal customers & don’t want them to be able to open the calendar item directly or if they do have it open in another window.

    Thanks in advance!
    Aaron

  50. Hi Christophe

    This is great! I am using this tiny calender in my sharepoint site. It works perfectly fine. The only issue i am facing is, when i hover on any event, event text becomes invisible, so calender gets shrinks in height.
    Like if i have 2 events on a day, and I hover on event 1 then the content of event one is hidden, only the content of event 2 is visible. It looks bad when calender keeps on shriking / expanding with the mouse hover event.
    Do you have any idea, why it is so?

    Thanks
    GK

  51. Hi Christophe,

    my boss loves the tiny calendar where I have implemented your second option with the cool hover to expand. My problem is he also likes the colour coding (thanks to your toolkit) I have implemented on the main calendar, so I am wondering if it’s possible to combine the tricks to get the colours to show on the tiny calendar too?

    • Hi again,

      sorry – I figured it out. I hadn’t modified the view (modify shared web opart > Edit the current view) )to change the tiny calendar so it uses the “Display” column instead of “Title”. I also hadn’t placed the CEWP which links to the TextToHTMLlite-v2.1.1.txt file UNDER the tiny calendar web part.

      It works like a charm when you take care to follow instructions….

      Your site rocks!

  52. We love your tiny cute calendar, Cristophe and use it extensively. ther eis one thing that has me stumped, though – if I have 2 separate tiny cute calendars on a single page (different web part zones), going forward/backward by month causes both calendars to change. Since the request is for multiple individual calendars to be placed on one page, this is posing a problem. Can you suggest a workaround? Many thanks for all you do for the SharePoint community!

    • Therese, I assume this issue is not specific to my customization, and you also experience this with full size calendars?
      SharePoint creates invalid markup when you put multiple calendars on the same page. I don’t have a workaround for this.

  53. I was wondering is there a way to shrink other web parts similar to the calendar web part? Do you have any information on this or point me to the right direction?

    • You’ll need to find the class used for the Web Part and modify it, just like I did with the calendar. For example, SharePoint uses the class ms-vb2 for standard lists.

  54. Hi Christophe,

    I love your site, and have recently been enjoying using the calculated column and color coding to good effect. I am currently playing with the tiny calendar, which is just about perfect with the exception of some issues with hovering, the same as mentioned by @William back in April 2009. I was thinking that the jQuery plugin hoverIntent might work, since the issue seems to be tied to the speed of the hover result. I am very new to jQuery and have been playing with it to see if I could figure out how to integrate it with the “shrink the title” method, but I am pretty much groping blindly and have had no luck so far. Can you tell me if this is possible, and if so could you post a short example of the syntax? Any advice is gratefully appreciated.

    Thanks for your amazing site, and wonderful OOTB solutions!

    • Isaac: first, the deal here is to get a lightweight solution, CSS only. You could of course use jQuery, but it would be much heavier.

      Going through the comments, I see a simple answer: keep the current solution, just add a white background to make it readable:
      .ms-cal-monthitem a:hover {position:absolute;font-size:10px;background-color:white;border:1px solid;}

      Let me know if this works for you.

      • Thanks for your reply Christophe! I had tried using something similar to that based on the previous comments, but anytime I include “position:absolute” it causes my browser to freeze on mouse-over. I tiried again with your revision above, but experienced the same issue with freezing. The readability of the text is fine when it stays still, the problem I am having is that on some dates with multiple entries the items are very hard to pinpoint, and jump erratically from small to magnified text as the user attempts find just the right hovering spot. This doesn’t happen on all dates with multiple records, and I’m not sure why some work as desired while others are affected by the jumpiness. I was hoping that hoverIntent would make it easier for the effect to trigger properly, but I get your point about the heaviness of a jQuery solution. I’ll keep poking at it in CSS and see what I can figure out. Thanks again!

  55. Awesome Calendar mod!
    I was having trouble with the “1 More Item” link still being very large on my mini calendar, so added a couple more lines of CSS to shrink that as well

    a.ms-cal-more:link {font-size:3px;}
    a.ms-cal-more:hover {font-size:10px;}

    Hope this helps anyone with the same problem

  56. My question would be the same as Dave’s ;is there a way to link a calendar item (in calendar view) to a specific URL rather than the calendar list item such that when a user clicks the link he/she will be re-directed to the url specified?

  57. Hi Christophe (hope you are still picking this thread up). Thanks so much for the code, very helpdful indeed. I do have one question though. Once I click on a day and getthe day view, I cant see any easy way of getting back to month view. The icons for day/week/month are gone.

    Any ideas plz

    Thanks, Ben

    • Ben, I chose to hide the icons to get the smallest possible calendar. but you can have them back.
      There’s a section in the CSS called /* thin out header */. This is the part where the icons are hidden. Play with lines 22 to 25 to see how it affects your view.

  58. Thank you, thank you, Christophe and all the good people who have offered up suggestions in the comments. The mini calendar with a zoom on event title and white background is exactly what I needed.

    I’m sure I will be back as I’m just starting to use SharePoint.

    Leah

  59. Christopher,

    I love what you have done. I did have one quick question. When I click on a day in the tiny calender it opens up the day view. How would I set it to open up to the large calender?

    Thanks

  60. Great tip! However, I ran into a weird problem with the width. For some reason the calendar was stuck being very wide. A bit of poking around the generateed source and adding hte following rule fixed it for me.

    #CalViewTable1 tbody tr td img {display:none;}

    For whatever reason that img was hard-coded at a width of 742px.

  61. For this to work you have to make one small tweak (forcing nowrap on the week day names)

    /* Tiny Calendar */
    /* Christophe@PathToSharePoint.com */

    /* Remove week blocks */
    .ms-cal-weekempty {display:none;}
    .ms-cal-week {display:none;}
    .ms-cal-weekB {display:none;}
    .ms-cal-weekB {display:none;}
    /* Shrink cells */
    .ms-cal-workitem2B {display:none;}
    .ms-cal-noworkitem2B {display:none;}
    .ms-cal-nodataBtm2 {display:none;}
    .ms-cal-todayitem2B {display:none;}
    .ms-cal-workitem {font-size:0px;}
    .ms-cal-muworkitem {font-size:0px;}
    .ms-cal-noworkitem {font-size:0px;}
    .ms-cal-nodataMid {font-size:0px;}
    .ms-cal-todayitem {font-size:0px;}
    /* thin out header */
    .ms-cal-nav {display:none;}
    .ms-cal-nav-buttonsltr {display:none;}
    .ms-cal-navheader {padding:0px;spacing:0px;}
    .ms-calheader IMG {width:15px;}
    /* Abbreviate weekdays */
    .ms-cal-weekday {white-space:nowrap;letter-spacing:6px; width:22px; overflow:hidden;}
    /* events display */
    .ms-cal-defaultbgcolor {padding:0;}
    .ms-cal-defaultbgcolor a {font-size:3px;}
    .ms-cal-monthitem a {font-size:3px;}
    .ms-cal-monthitem a:hover {font-size:10px;}

  62. I used the following lines to disable the links to day view:

    .ms-cal-topdayover {visibility:hidden;}
    .ms-cal-topdayfocusover {visibility:hidden;}
    .ms-cal-topday-todayover {visibility:hidden;}

    It works great, but when I hover over the date, it disappears (like a white-out). Any suggestions? Thanks!

  63. hi
    how to customise javascript in share point spcalenderview ,here if i select date and click next it will begetting error,same as week,but month working properly pls tell me answer

  64. How would I keep the calendar cells the same height and width when there are more than one or two events on a day? I seem to recall a solution where the “1 more item” was replaced by a drop down arrow and the user would click that to see more items in a day view. Is this possible?

    • Eric, I am sure hiding the “1 more item” is possible, but I haven’t done it myself. You’ll need to dig into the calendar html to find the right element.
      As for the same height, this is always tricky, and might also depend on the browser. Here too, I don’t know.

  65. The mini calendar looks wonderful – thank you Christophe!! Few questions, though – I would like to disable the day click and keep all calendar content from appearing in the mini calendar – I want a day to be highlighted if a meeting is on the calendar for that day – and then if someone clicks on that day, it brings up the full master calendar in another browser window. I’m still digging, but if anyone has any tips, please post – thanks bunches!!!!

  66. Excelent work Christophe!
    There is just one problem with the mini calendar. When I do new calendar item and choose it to be repeating event I can see it perfectly in the calendar but when I go top of (hover) any of those repeating days it shows white text. Do you know how modify css properties for repeating events?

    • One more thing: when I change properties (ie font-size) for .ms-cal-monthitem a:hover -style it also affect to the repeating event but it won’t affect to background or font color! Any ideas?

  67. Hi Christophe,

    I am interested in the tiny calendar tutorial u have published…

    But I did not understand the previous part.. How to create calender in CEWP??

    I saw the tutorials of CEWP they are doing it for outlook.. What code should we put for calender control?

    What I am doint now is..

    1. I created a Sharepoint content list “Calender”.

    2. edited calendar.aspx and applied the styles provided by u..

    When I view calendar.aspx in browser new style is getting applied but when I am adding this webpart in to default. aspx, same old big calender is getting displyed

    Please hepl me with this…

    Thanks in advance…


    Cheers
    Nagalakshmi Srirama

  68. Perfect! This example solves quite a few problems for me.

    For anyone having trouble, when copying and pasting the code, remember that the line numbers are copied over with it. Additionally, when remvong the line numbers, make sure to keep the . in front of ms-…. Just open a CSS Web Part, Go to Source and copy over. Remove the line numbers and add your Calendar. Should be fine after that.

    • Just for information !…

      We have an option for Copy to Clip board. If we use this option then No need to worry about removing numbers and all…

      -
      Thanks,
      Rao.

  69. Hi Christophe,

    Is it possible to apply these same styles for Day View and as well for Week Views. For my requirement I need this for both Day and Week views. For month view it is working fine….

    Thanks,
    Rao.

  70. Christophe,

    Thank you for the the great resources you provide all of use with. I am looking to create something similar to this page

    http://www.csufresno.edu/events/?trumbaEmbed=eventid%3D22615548%26view%3Devent%26-childview%3D#/?i=8

    where users can click on the tiny calendar date and it automatically updates the list view instead of opening up in the same web part zone. I’ve looked into establishing web part connections but it does not look as if you can create connections from a calendar view web part to another web part. Could you point me to some resources that could help me accomplish this task. At the moment I have a page with your tiny calendar implementation and a multitude of list views of the calendar filtering specific event types [all using your easy tabs v5 :o) ]. I would like the tiny calendar to update the list views of the calendar on the same page. May be asking too much however.

  71. I’ve used many of your tutorials, including all of your calendar web parts and find all of them simple to follow and very helpful. I’m adding a Calendar Web Part to a Web Part Page and everything is working fine (the small calendar web part, color coding webpart, and remove weekdays web part), but I was wondering if there is a simple way to center the calendar. It’s probably something very easy, but I haven’t been able to find a solution on the web. Sorry for the late post. Thank you so much for everything you’ve shared with us beginners!

      • Sorry for the late response. I actually did set a fixed width because I don’t want the calendar to span the entire size of the body of the Web Part Page. But it hangs all the way to the left and makes the rest of the page look unbalanced. The content above it is in its own CEWP and is padded so that it has an even feel to it. But the Calendar looks too wide if I don’t give it a fixed width in the Appearance settings. And if I do give it a fixed width, I don’t know how to pad it or center it so that it’s not staying too far to the left. Does that make sense?

        • I see. Well, that’s why Web page layouts usually include multiple sections of different widths (like the SharePoint home page which has a 70%-30% layout).
          By default SharePoint will align Web Parts to the left. For a different behavior, you’ll need to modify the stylesheet of your page.

  72. HELP!! I used this in SharePoint 2007, and it worked GREAT. We just migrated to SharePoint 2010, however, and it broke. Has anyone been able to come up with a solution? I have played around with the CSS to no avail. Any help would be greatly appreciated!

    • Hi Kyle, I just posted this over in the Part 1 comments:

      Hi Christophe, I had been trying to work with your solution for a SP 2010 calendar, and it appears this functionality is OOTB. You can specify the width of the web part and SP will do the rest, unlike in 2007 where it gave scroll bars because the viewable area was smaller than the calendar. 400-450 pixels looks good. If you specify the height though, the scroll bars come back.

  73. Hi Christophe,

    Thanks you for this wonderful solution.. It worked great. I have a query, on switching to next/previous month from the tiny calendar. It refreshes the page. Is there any way that only tiny calendar refresh not the whole page.
    Thanks you again for this beautiful calender.

  74. From earlier in this thread “Is there a way to get a calendar item to link to a specific URL (if I have a URL column in my list) when you click on it instead of to the default view of the list item?”

    You said you thought there migh tbe. Did you ever work somehting out ?

    Thanks

  75. Pingback: A tiny cute SharePoint calendar (Part II) « Path to SharePoint | Dan's Place

  76. Hi,
    does anyone have css for SharePoint 2010? The one that Mark gave doesn’t work. I checked the calendarV4.css and there are no such classes in there.

  77. I am regularly asked if I have a similar solution for SharePoint 2010 and the answer is no. The SharePoint 2010 calendar relies on JavaScript (while the 2007 one was pure html) and is harder to deal with (not to mention the bugs). We’ll see how it goes with the next version, but for now if you need a flexible and reliable solutions your best bet is to investigate third party calendars (like FullCalendar for example).

  78. Has anyone achieved a mini calendar with SharePoint 2010 (that only shows events for the day on hover, no text) and disables the clicking through to day/week views ?

  79. I know this is probably a long shot that you still look at this but I’m having trouble with this becasue everytime I go back to the home page the calendar defaults to a weekly view and then I’m stuck there because the code takes out the nav. How can I make the month view the default on the main page?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s