Solved

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

Posted on 2011-03-09
9
2,006 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
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
 
LVL 8

Expert Comment

by:nsyyoung
ID: 35087682
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

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:
shinuq 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo‚Ķ
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
This video teaches users how to migrate an existing Wordpress website to a new domain.

747 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now