First of all I want to thank you for this great app.
I build a website by Wordpress where I am using the Wordpress plugin an so far it works well
You can see it at:
marktflecken-villmar.de/veranstaltungskalende/
My problem is, that I have many event without any start and end-time.
So I want to set them on “Fullday” - and that works for me.
In the Agenda View there is show, the start day - to end-Day.
So my question: Is the a way to show only the Start-day in the Agenda View.
I have to say that my Java is very basic, so I would ask you for a sep by step instruktion.
Thanks in advance from Germany
Frank Hamm
radyno
#2
Hi,
please, find file wp-content/plugins/event-calendar-scheduler/scheduler_include.html and add the follow code inside:
<script>
scheduler.templates.agenda_time = function(start,end,ev){
if (ev._timed)
return this.day_date(ev.start_date, ev.end_date, ev);
else
return scheduler.templates.day_date(start)+" – "+scheduler.templates.day_date(end);
};
</script>
Hi and thanks for your reply and help. I think I explained my needs wrong.
the event 1 and 3 in the agenda are my problems. This 2 events a set as full day, and I want them to displayed only with the start date.
Event 2 is an event with rearly is going on serveral day.
Event 4 and 5 are created with Start-Time. In this Cases I want the Start-Time to be displayed, with is after adding your coded anymore.
I hope I was able to explain what I need?
Kinde regards and thanks in advance for any further help.
Frank Hamm
In the meantime I was able to get the time output be shown for the events which have a Start Time - in my testcases Nr. 4 + 5
This is the code at the moment
My problem is to create a second if to find the events which are set to full_day. And how to get away the End-Date for them.
Any ideas??
radyno
#5
Hi,
sorry for the delay in answerring.
Could you provide actual events, existing events aren’t shown in agenda-view any more.
I have dded testevent. One with start and endtime, one without anytime (fullday) and one ist an event over more than one day.
Thanks in advance
radyno
#7
Try to use the follow template:
scheduler.templates.agenda_time = function(start,end,ev){
if (ev._timed)
return this.day_date(ev.start_date, ev.end_date, ev) + " " + scheduler.templates.hour_scale(ev.start_date) + " - " + scheduler.templates.hour_scale(ev.end_date);
else {
var isFulldayEvent = (scheduler.date.time_part(ev.start_date)===0 && scheduler.date.time_part(ev.end_date)===0 && ev.end_date.valueOf()-ev.start_date.valueOf() < 2*24*60*60*1000);
if (isFulldayEvent)
return this.day_date(ev.start_date, ev.end_date, ev);
else
return scheduler.templates.day_date(start)+" – "+scheduler.templates.day_date(end);
}
};
Thank you so much !!! You made my day!!
Kind regrads from Germany
Frank