Link to home
Start Free TrialLog in
Avatar of sullisnyc44
sullisnyc44Flag for United States of America

asked on

Sharepoint Calendar View on custom list - CEWP to hide time?

so I want to create a calendar view for a custom list. I only have a date only field.
the calendar displays 12:00 AM (really Sharepoint??)

So I would like to hide the stupid 12:00 am from displaying.

Can I do that by adding code (jquery, css, whatever) to a CEWP at the bottom of the page?
Avatar of nsyyoung
nsyyoung
Flag of United States of America image

I seem to be on calculated column issues today.  Can you calculate a column to trim away the time and use that column in your calendar view?  Will it show up as a date?

Worth a try, anyway.  Someone probably has a better answer.
Avatar of sullisnyc44

ASKER

no. I just use date only feature of a date-time column.

I'm not adverse to adding a bunch of unnecessary display columns to my forms/views and then just hiding them with jquery, I just don't think the calendar view will allow me to select it as a the manadatory Start Date and End Date and thus not solve my time issue.

can't I add some sort of 'display:none' atrribute to a cewp?
Just to clarify, you want to show a calendar grid in a CEWP?
No.

i would like to hide/delete/destroy the 12:00AM from displaying in my standard calendar view of my custom list with a Date Only column.

Can it be suppressed with a CEWP?
Sullisnyc44

SharePoint shows the hour because it always stores the hour in the "Date" column - the "Date only" or "Date and time" switch is only for the presentation layer - it turns off the hour and minute pickers on the add/edit form and hides the hours on the views and view item page. If you export the data to excel or access or turn on the hours you can see theat there is going to be 12:00 in the column. I guess MS guys forgot to hide it on the monthly view and  did an even worse job on the week nad day view, where such events are displayed as 1 hour events at 12:00 AM.

CEWP does not enable you to modify or generate calendar views. You can do a workaround with javascript and hide the hour.
i;m assuiming you are using the monthly view. f so use SPD to open the page with the view, and at the bottom of the page add a javascript code that will hide the time.
Unfortunatelly the time is not in a specific tag or style, so you need to do a loop through TD's with "ms-cal-monthitem" class and inside each such tag find anchor tag (<A>) and then remove the first occurance of the <NoBR> tag - this is where the hour is hidden.

If you need a code snippet let me know.
a code snippet would be lovely. Thanks :)
ASKER CERTIFIED SOLUTION
Avatar of Shinesh Premrajan
Shinesh Premrajan
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial