|
Index | Recent Threads | Register | |
Forums » List all forums » Forum: General Discussion » Thread: Select current year on start_date parameter |
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 |
|
wfbonsaiclub
New Member
|
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 |
||
|
Lyonsambulance
New Member
|
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. |
||
|
support
localendar Expert Joined: Aug 9, 2022 Posts: 6397 Status: Offline |
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 |
||
|
support
localendar Expert Joined: Aug 9, 2022 Posts: 6397 Status: Offline |
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 |
||
|
wfbonsaiclub
New Member
|
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 |
||
|
support
localendar Expert Joined: Aug 9, 2022 Posts: 6397 Status: Offline |
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 |
||
|
wfbonsaiclub
New Member
|
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 |
||
|
support
localendar Expert Joined: Aug 9, 2022 Posts: 6397 Status: Offline |
Here's 1 line of script that will always write out a link that leads to the year-view for the current year: <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 |
||
|
[Show Thread Printable Version] [Post new Thread] |
Help! | Cobranding | Legal | Privacy Policy | About localendar.com | Contact Us |