Solved

asp calendar - customize display

Posted on 2013-12-11
4
429 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

Industry Leaders: 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!

Question has a verified solution.

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

In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
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)
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…

749 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