CJ

The circle of life – ** .Net – Training – MOSS **

  • Past Post

  • Vistor Locations

Problems with Calendar list and custom forms

Posted by Clayton James on May 30, 2008

Recent problems I have come across when designing custom forms for the Calendar list. This work couldn’t be completed using Visual Studio (project requirements).

Hmmm….its these little things that take time when working sharepoint….ok sometimes it is also the big ones 😉

Problem 1
Create a list from the Calendar template.

  1. Create your own custom forms (NewForm.aspx. EditForm.aspx or DispForm.aspx) in SharePoint designer (I didn’t remove the existing web part I just hid it).
  2. Now go and add new item using your new forms and then edit the item you have just entered.
  3. Select the make all day event check box and wham…you receive the lovely error occurred error message. Apparently this is a reported bug.

Problem 2
Same scenario as described above. Custom forms in a calendar list.

  1. Now add a third date column and make it a date only.
  2. Add a new item and fill in all dates and select the All Day Event check box and save the record
  3. Now edit same the item and you will see that the third date column has automatically decreased its value by one day. Continue to save and edit and that third date column will decrease its value by one day every time you save the record back to the list.

Problem 3
So with all these issues I went to a custom list. But my problems didn’t end there. Date only columns default to a time of 12:00am. This means that if you select a start date and an end date and display it as a monthly calendar view then the item displays up to the end date at 12:00am, so it displays one day short. If you add 5 minutes to the time and make it 12:05am then it displays for the whole day and looks correct.

Update: Work around

  • Changed Date columns to Date and Time columns and defaulted to Today date. This defaults the time component to the current time which is required so it shows up correctly in the Calender view (not one day short).
  • This then inserted the time component in the NewForm.aspx and EditForm.aspx so I hid the time component using CSS. Style: ms-…{block:none}

Problem 4
Same scenario as described above. Custom forms for a custom list.

  1. Dates display correctly to the regional settings that are set except for dates on the DispForm.aspx. It always displays in US format even though SharePoint’s regional settings is set to something else.

Update: work around

  • Open the Dispform.aspx in SPD and change the xsl for the DateTime field and set the date format to 5 (instead of 1). This will now only show the date component

Also when creating your own custom forms using SharePoint designer you should never remove the existing List Form Web Part on the .aspx, just make them hidden.
http://support.microsoft.com/kb/935504

 

Would love to hear other peoples workarounds in the above situations.

Advertisements

18 Responses to “Problems with Calendar list and custom forms”

  1. Oliver Fisk said

    Would be really interested in finding a solution for problem 1.
    At this stage it seems calendar forms are totaly uncustomisable. Huge bug.

  2. CJ said

    Hi Oliver
    Totally agree. Seems to be many issues customising Calendar list forms.
    CJ

  3. wolfezw said

    how to hid the time component using CSS. Style: ms-…{block:none} or javascript ,could you please give more details? thanks for your help.

  4. cj said

    Wolfezw
    I didn’t realise it cut off the css class name…sorry. I am not sure off the top of my head what class name the time component of the DateTime field is called. What I did was use IE Developer toolbar to find the css class name of the component and then in the custom forms (.aspx pages) I applied .ms-[class name]: {block:none} which will hide the time component.

    Maybe you could post the css class name here when you find out what it is…that would be greatly appreciated.
    CJ

  5. wolfezw said

    thanks you so much, I will try to find out the class name.

    wolfezw

  6. CS said

    Hello,
    I’ve been working on a custom list for a calendar and I created a custom dispform.aspx page. Basically a new aspx page that I dropped in the data form webpart on to display fields that I want and hide those that I don’t end users to see. The parameters are setup for querystring(ID) and all works well until I hit a recurring event. If I click on the recurring event…the new dispform page I created defaults to the first event on the list. Have you seen this? I’ve been trying to figure out why I can’t display the details of a recurring event with a data form web part. Using the List Form web part…it’s fine but I can’t show/hide the fields that I want. Any suggestions? Thank you.
    CS

  7. APN said

    I have created a new display page for a calendar list using the data view web part. It does not work right with recurring events. If I click on a recurring event, the event details being displayed are the details of the first created event on the list. If the event is a single event, it displays details just fine.
    Did somebody find a solution to this issue?

  8. Andy said

    I have the same problem as CS and APN with recurring meetings. I think sharepoint must be storing each occurance in a hidden list somewhere as there doenst appear to be any details about the recurrence in your row apart from the @recurrence=1 field.

  9. APN said

    I actually found a fix for that problem.
    Open the .aspx page, where you have your DataFormWebPart, using SharePoint Designer. Then select the WebPartPages: DataFormWebPart in Design mode and click on the emerging arrow to the right to display the Common Data View Tasks menu. In the Common Data View Tasks menu, click on Parameters. You should be able to see two Parameters: ListItemID and ListID. Select the List ID parameter, and remove it from the list. Click OK to save your changes.
    Your Series Items details should work properly now.

    • Jen said

      This unfortunately did not display the detailed textual information about the recurring event. It just shows 1 or 0. Any more ideas?

      —————————-
      APN said

      July 15, 2009 at 5:33 am
      I actually found a fix for that problem.
      Open the .aspx page, where you have your DataFormWebPart, using SharePoint Designer. Then select the WebPartPages: DataFormWebPart in Design mode and click on the emerging arrow to the right to display the Common Data View Tasks menu. In the Common Data View Tasks menu, click on Parameters. You should be able to see two Parameters: ListItemID and ListID. Select the List ID parameter, and remove it from the list. Click OK to save your changes.
      Your Series Items details should work properly now.

  10. Tile Bathroom…

    […]Problems with Calendar list and custom forms « CJ[…]…

  11. If some one wants expert view about running a blog then i
    recommend him/her to pay a quick visit this weblog, Keep up the good work.

  12. Rod said

    Hi CJ could you kindly send me code of this custom calendar list with custom form to rsvacchi@gmail.com

    many thanks

    Rod

  13. Incredible! This blog looks just like my old one! It’s on a completely different topic but it has pretty much the same layout and design. Superb choice of colors!

  14. Problems with Calendar list and custom forms

    […]you make blogging glance[…]

  15. There are also many other ankle-foot braces and cast
    that remove pressure from the foot. The discomfort can range from mild
    to dreadful and in some instances can be quite incapacitating with a total loss
    of sensation. And that’s the best way to ensure a good outcome from any medical treatment.

  16. I’m not sure exactly why but this website is loading incredibly slow for
    me. Is anyone else having this issue or is it a issue on my end?
    I’ll check back later and see if the problem still exists.

  17. Rocky said

    I am truly grateful to the owner of this web site who has shared this enormous paragraph at here.

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

 
%d bloggers like this: