Solved

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

Posted on 2011-03-09
9
2,124 Views
Last Modified: 2012-05-11
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?
0
Comment
Question by:sullisnyc44
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 8

Expert Comment

by:nsyyoung
ID: 35086083
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.
0
 

Author Comment

by:sullisnyc44
ID: 35086370
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?
0
 
LVL 8

Expert Comment

by:nsyyoung
ID: 35087565
Just to clarify, you want to show a calendar grid in a CEWP?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 8

Expert Comment

by:nsyyoung
ID: 35087682
0
 

Author Comment

by:sullisnyc44
ID: 35094780
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?
0
 
LVL 15

Expert Comment

by:dp_expert
ID: 35178979
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.
0
 

Author Comment

by:sullisnyc44
ID: 35190604
a code snippet would be lovely. Thanks :)
0
 
LVL 17

Accepted Solution

by:
Shinesh Premrajan earned 500 total points
ID: 35229231
Look a the view source and see whats the 12:00 AM is in.
Something like
<div id="time"> 12:00AM</div>

In the css that ist using u need to add the additional css to hide this as

#time{display:none};

Also you can add this script  specific to a single page instead by pasting the above code.
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
The viewer will learn how to count occurrences of each item in an array.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question