WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 Datepicker bug?, Steve O'Neal, August 17, 2003
     Re:Datepicker bug? , Jeffrey Jangli, August 17, 2003
     Re:Datepicker bug?, Steve O'Neal, August 17, 2003
         Re:Datepicker bug?, Erik Arvidsson, August 24, 2003

Subject: Re:Datepicker bug? From: Erik Arvidsson Date: August 24, 2003
This is indeed a bug but I think it would be better to select the last in the month when the date is larger than the number of days in the month.

I'll have to look into this a bit.

erik

_______________________________________________________

Here are the changes I made. I just added the lines in red.
What da ya think, Erik?
DatePicker.prototype.goToNextMonth = function () {
var d = new Date( this._selectedDate );
d.setDate(1);
d.setMonth( d.getMonth() + 1 );
this.setDate( d );
}
DatePicker.prototype.goToPreviousMonth = function () {
var d = new Date( this._selectedDate );
d.setDate(1);
d.setMonth( d.getMonth() - 1 );
this.setDate( d );
}

From: Steve O'Neal
Sent: August 17, 2003
Subject: Re:Datepicker bug?

When the current date is the 31 and you click on the next month. If that month does not have a 31st, it will jump to the next month.
For instance If the current date is March 31, 2003 if I click on the next month field it will jump to May 1, 2003.
Could this be a bug? I have verified this on your demo page too.
The easy fix, I think would be to reset the day to 1.






Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX