odd behavior when clicking on calendar title

To reproduce:

1) go to http://scal.fieldguidetoprogrammers.com/scal-v02-documentation
2) click on "Test It"
3) click month forward 3 times.
4) click title, calendar returns to current month. this seems normal (somewhat).
5) click month forward 3 times.
6) select a day in that month.
7) click title, calendar returns to May, 2008 with 31st selected (odd).

jgc@panix.com

Has anybody looked into

Has anybody looked into fixing this? It seems to work if you comment out those three lines of code. But I just started using scal, so don't take my word for it. :-)

Yes, commenting out those

jamiegrove's picture

Yes, commenting out those lines should work. The answer is correct. We just haven't updated the source yet.

caltitle bug

jamiegrove's picture

Thanks for reporting this. In checking this one out, I found that you can get this error to happen without doing the month forwards. Just select a date in the calendar and hit the title.

The error is in the _switchCal internal function.

if (this.currentdate.getDate() != sday){
this.currentdate.setDate(0); //this is the line that causes the error
}

Although this function is a handler for several controls, I'm not exactly sure why this is here. I can correct the bug, but I'm hoping to get some input from Ian before I do.

Thanks again.

- Jamie

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options