date_input to slow some times
| Project: | Date Input |
| Version: | 1.1.3 |
| Component: | Code |
| Category: | bug report |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Hello ^_^
I use date_input under FireFox 2.0.0.12 (under IE all works fine) with much plugins and on big html page with tons of another js...
So date_input works very slow. About 2 second delay after I tryied to select day in calandar.
After some playning with js, I found what the reason is in selectMonth: function(date) {}.
On this lines:
this.monthNameSpan.empty().append(this.monthName(date) + " " + date.getFullYear());
this.tbody.html(dayCells);Whey long delay on exec.
I made some work around, it helps to except delay until we change month:
selectMonth: function(date) {
this.currentMonth = date;
var rangeStart = this.rangeStart(date), rangeEnd = this.rangeEnd(date);
if (this.lastRange == rangeStart+' '+rangeEnd) {
$('td', this.tbody).removeClass("selected");
return;
} this.lastRange = rangeStart+' '+rangeEnd;
/* your old code here */
}So we just check is month same as last selected? If yes then we don't need to rebuild html, just clear last selected date.
Hope u will check this bug. If not, thanks any way for your grate job.
P.S. Sorry 4 bad english ^_^

Comments
#1