|
Index | Recent Threads | Register | |
![]() |
Forums » List all forums » Forum: Webmaster's Corner » Thread: One week look ahead... how do I do that on the W1 Style |
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 |
|
TravisTigerBand
New Member ![]() Joined: Jun 6, 2007 Posts: 6 Status: Offline |
Hi, This is a newbie JavaScript Question. I'm using the list format W1. Is there a easy way to do a one week look ahead from the current week? I want to see NEXT week's events. I'm hoping someone has already written something. Thanks -BB- |
||
|
jamiecd77
Veteran ![]() Joined: Oct 25, 2006 Posts: 77 Status: Offline |
I think we can handle that.... try adding the start date criteria to your link/code. for example http://www.localendar.com/public/travistigerband?style=W1&start_date=6/1/2008 When using the W1 style, the start date tells your calendar what week to display, The above example will actually start on the second, If you change the date to 6/3/2008, it will still start on the second. hope that helps, Jamie ---------------------------------------- Peer-Support Specialist ---------------------------------------- [Edit 1 times, last edit by jamiecd77 at May 26, 2008, 3:51:36 AM] |
||
|
TravisTigerBand
New Member ![]() Joined: Jun 6, 2007 Posts: 6 Status: Offline |
Hello again. Thanks Jamie. Using the date in the string I understand. However, I want to dynamically change the date in the JS String to be 7 days from now. Example: If today were 6/1/2008, I want to present for 6/8/2008 If today were 6/8/2008, I want to present for 6/15/2008 Like the way the month forward button works but for a 1 week increment. I've looked into the set.date method, but I don't know how to push and/or pull the new date into the W1 string. ![]() Thanks -BB- |
||
|
jamiecd77
Veteran ![]() Joined: Oct 25, 2006 Posts: 77 Status: Offline |
Alack, I think you are going to have to code that yourself...There is no method that I know of in Localendar to call "next week" from the initial published calendar. Of course, the arrows on the top and bottom automatically go to next week, but I think the publishjump routine the arrows use is a lookup table... Marc, ideas? ---------------------------------------- Peer-Support Specialist |
||
|
TravisTigerBand
New Member ![]() Joined: Jun 6, 2007 Posts: 6 Status: Offline |
I found something... I can build the string, but how do I get the scr to accept it? <html> <body> <script type="text/javascript"> var today = new Date(); today.setDate(today.getDate()+7) var theMonth = today.getMonth()+1; var theDay = today.getDate(); var theYear = today.getYear(); var thestring ="http://www.localendar.com/public/travistigerband?include=Y&style=W1&start_date="+(theMonth + "/" + theDay + "/" + theYear); document.write (thestring); </script> <SCRIPT language="Javascript" src= thestring > </SCRIPT> </body> </html> |
||
|
support
localendar Expert ![]() Joined: Aug 9, 2022 Posts: 6437 Status: Offline |
How's about something like this?
---------------------------------------- Marc Higgins Support Associate, localendar.com Follow us on Twitter! http://www.twitter.com/localendar_news ---------------------------------------- [Edit 1 times, last edit by support at May 30, 2008, 12:08:52 AM] |
||
|
TravisTigerBand
New Member ![]() Joined: Jun 6, 2007 Posts: 6 Status: Offline |
Sweet! Thank you! ![]() |
||
|
TravisTigerBand
New Member ![]() Joined: Jun 6, 2007 Posts: 6 Status: Offline |
One issue appeared in Firefox and Safari... The string HAS to be MM/DD/YY. Cheap and dirty fix... (Ugly!) if (theMonth < 10) { theMonth = "0"+ theMonth.toString() } if (theDay < 10) { theDay = "0"+ theDay.toString() } theYear = theYear - 2000 if (theYear < 10) { theYear = "0"+ theYear.toString() } Got a better way? -BB- |
||
|
[Show Thread Printable Version] [Post new Thread] |
Help! | Cobranding | Legal | Privacy Policy | About localendar.com | Contact Us |