Solved

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

Posted on 2011-03-09
9
2,200 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
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 

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

Veeam gives away 10 full conference passes

Veeam is a VMworld 2017 US & Europe Platinum Sponsor. Enter the raffle to get the full conference pass. Pass includes the admission to all general and breakout sessions, VMware Hands-On Labs, Solutions Exchange, exclusive giveaways and the great VMworld Customer Appreciation Part

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

630 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