Solved

asp calendar - customize display

Posted on 2013-12-11
4
440 Views
Last Modified: 2013-12-11
Hi
My organization is using a classic asp calendar to display events. Each day displays the name of the event and the starting time. Sometimes there are repeating events on the same day with different starting times. This causes a redundant display of event names for the same day. I would like to leave only the first instance of a repeating event name and just show the different starting times.
I can't figure out how to do this. Is there some way of manipulating the recordset or the display, in Jquery maybe, to remove certain entries?
Here is the calendar:
http://www.imj.org.il/vision/calendar/
Thanks,
Avi
0
Comment
Question by:avir
[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
  • 2
  • 2
4 Comments
 
LVL 82

Expert Comment

by:leakim971
ID: 39711042
Do you want to do that with jQuery after loading the page?
0
 

Author Comment

by:avir
ID: 39711048
That could be good.
I thought of surrounding each event name with a div and assigning its name as a class and then removing all of them except the first. But I'm not sure of how to do this.
0
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 39711054
The following do the thing :
$(document).ready(function() {
	var calendar = $(".nine.large-9.columns.col-content");
	var days = $("td", calendar); 
	days.each(function() {
		var dis = $(this);
		$("div.item a", dis).map(function() {
			var value = $(this).text();
			var with_same_value = $("div.item a", dis).filter(function() { return $(this).text()==value; });
			var duplicates = with_same_value.not(":first");
			var calendar_events = duplicates.closest("div");
			calendar_events.remove();
		});
	});	
});

Open in new window

work
0
 

Author Closing Comment

by:avir
ID: 39711076
Very good, except it also removed the hours. But I fixed it by taking the hours out of the div.
Thank you very much.
0

Featured Post

Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

Question has a verified solution.

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

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

691 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