Welcome Guest   | Login   
  Search  
  Index |  Recent Threads |  Register | 


Quick Go »
Thread Status: Normal
Total posts in this thread: 8
[Change thread status] [Delete this Thread] [Move this Thread]
[Add To My Favorites] [Watch this Thread] [Post new Thread]
Author
Previous Thread This topic has been viewed 68 times and has 7 replies Next Thread
wfbonsaiclub
New Member



Joined: Mar 30, 2016
Posts: 3
Status: Offline

Edit this Post   Select current year on start_date parameter Reply to this Post
Reply with Quote
[Delete this Thread]

I am creating a web site for a club, and we only meet once a month through the year. I don’t want to display a full year calendar; I just want to show the details of each monthly meeting. So I have created a web page with 12 separate calendar entries, using a monthly list format for each one.

<SCRIPT type="text/javascript" src="//localendar.com/public/wfbonsaiclub?style=M1&include=Y&start_date=01/01/16&rss_link=false"></SCRIPT>

By using a different start_date parameter, each entry shows a different month. E.g. start_date=01/01/16 on first month, start_date=02/01/16 on second month, etc.

The problem is, I presume that every January I will have to change the years in all the start dates. So I would like it to automatically use the current year. E.g. start_date= 01/01/(current year).
I can’t find anything on the forums which describes how to do it.
I presume it is possible because it is similar to this example

http://localendar.com/docs/display/lc/Dynamic+links+to+multiple+calendar+months

I have tried to do this, however my knowledge of html script is very, very limited and I can’t get it to work correctly.
Can you please confirm if this is possible?
If it is, I would really appreciate it if someone could tell me the correct code.
Thanks
Brian
[Apr 14, 2016, 5:51:50 PM] [81.170.121.219] Show Post Printable Version [Link] Report threatening post: please login first  Go to top 
Lyonsambulance
New Member



Joined: Mar 6, 2013
Posts: 3
Status: Offline

Edit this Post   Advancing calendar Reply to this Post
Reply with Quote
[Delete this Post]

I find that in the edit mode I can advance my calendars from month to month. When I close the edit mode and view on my webpage the months will not advance. I have this problem with MAC and WINDOWS OS.
[Apr 16, 2016, 1:28:40 PM] [173.76.16.217] Show Post Printable Version [Link] Report threatening post: please login first  Go to top 
support
localendar Expert
Member's Avatar


Joined: Sep 15, 2004
Posts: 5964
Status: Offline
Edit this Post   Re: Advancing calendar Reply to this Post
Reply with Quote
[Delete this Post]

Can you post a link to the web site where your calendar isn't advancing? Most likely there is some javascript conflict with localendar and the script on your page (in these cases, we recommend the iframe include style)
----------------------------------------
Marc Higgins
Support Associate, localendar.com
Follow us on Twitter! http://www.twitter.com/localendar_news
[Apr 22, 2016, 2:16:41 AM] [65.113.88.17] Show Post Printable Version [Link] Report threatening post: please login first  Go to top 
support
localendar Expert
Member's Avatar


Joined: Sep 15, 2004
Posts: 5964
Status: Offline
Edit this Post   Re: Select current year on start_date parameter Reply to this Post
Reply with Quote
[Delete this Post]

Actually, the code on the sample page you linked to will always use the visitor's current year.
So if you based your html on that, once the calendar year rolls over to 2017, all the links on the page will be 2017-based too.

Btw, this is all just external javascript used to create the localendar link with a dynamic start date - none of this is localendar specific.
----------------------------------------
Marc Higgins
Support Associate, localendar.com
Follow us on Twitter! http://www.twitter.com/localendar_news
[Apr 22, 2016, 2:20:18 AM] [65.113.88.17] Show Post Printable Version [Link] Report threatening post: please login first  Go to top 
wfbonsaiclub
New Member



Joined: Mar 30, 2016
Posts: 3
Status: Offline

Edit this Post   Re: Select current year on start_date parameter Reply to this Post
Reply with Quote
[Delete this Post]

Marc
I appreciate that this is not a Localendar problem, and I have been trying to base the html on the example. The example is good but is overkill for what I want to do. Unfortunately my knowledge of html script is very, very limited and I can’t get it to work correctly, so I was wondering if anyone could give me an idea of what the html should look like.

Brian
[Apr 25, 2016, 2:17:39 PM] [81.170.121.219] Show Post Printable Version [Link] Report threatening post: please login first  Go to top 
support
localendar Expert
Member's Avatar


Joined: Sep 15, 2004
Posts: 5964
Status: Offline
Edit this Post   Re: Select current year on start_date parameter Reply to this Post
Reply with Quote
[Delete this Post]

If you've got a sample page you were trying to get working, I'm happy to take a look if you sent a link
----------------------------------------
Marc Higgins
Support Associate, localendar.com
Follow us on Twitter! http://www.twitter.com/localendar_news
[Apr 25, 2016, 9:18:56 PM] [24.190.224.252] Show Post Printable Version [Link] Report threatening post: please login first  Go to top 
wfbonsaiclub
New Member



Joined: Mar 30, 2016
Posts: 3
Status: Offline

Edit this Post   Re: Select current year on start_date parameter Reply to this Post
Reply with Quote
[Delete this Post]

Marc
I am developing the web site using Wix.com so I am not sure you will be able to see the code if I send you the link. However this is my crude attempt at the code (I said my knowledge is very limited)

p id="demo"></p>
<script>
var d = new Date();
var out = 3+"/"+1+"/"+d.getFullYear();
document.getElementById("demo").innerHTML = out;
</script>
<SCRIPT type="text/javascript"
src="document.write("//localendar.com/public/wfbonsaiclub?style=M1&include=Y&start_date="+out+"");”
></SCRIPT>

I am displaying the date to check that it is correct, and it displays ok. But I can’t get it to work in the start_date parameter.
It displays 3/1/2016 but nothing else. There is no error message from localendar.
I really appreciate any help you can give
Regards
Brian
[Apr 29, 2016, 2:40:43 PM] [79.68.128.255] Show Post Printable Version [Link] Report threatening post: please login first  Go to top 
support
localendar Expert
Member's Avatar


Joined: Sep 15, 2004
Posts: 5964
Status: Offline
Edit this Post   Re: Select current year on start_date parameter Reply to this Post
Reply with Quote
[Delete this Post]

Here's 1 line of script that will always write out a link that leads to the year-view for the current year:

<script>
document.write("<a href='http://www.localendar.com/public/wfbonsaiclub?style=Y0&start_date="+((new Date()).getMonth()+1)+"/"+(new Date()).getDate()+"/"+(new Date()).getFullYear()+"'>Go to calendar for current year</a>");
</script>


Of course, I'm not sure wix lets you use script tags or document.write, but this will work on normal HTML pages
----------------------------------------
Marc Higgins
Support Associate, localendar.com
Follow us on Twitter! http://www.twitter.com/localendar_news
[May 6, 2016, 8:13:23 PM] [24.190.224.252] Show Post Printable Version [Link] Report threatening post: please login first  Go to top 
[Show Thread Printable Version] [Post new Thread]

Help! | Cobranding | Legal | Privacy Policy | About localendar.com | Contact Us