fix a bug with doubleclicking on a calendar to zoom in

This commit is contained in:
rlx 2011-10-10 20:48:35 +00:00
parent ccece375c0
commit 5948d2c2ce
2 changed files with 1 additions and 2 deletions

View file

@ -423,7 +423,7 @@ Ox.Calendar = function(options, self) {
} else {
if (self.options.zoom < self.maxZoom) {
self.options.date = new Date(
(+self.options.date + +getMouseDate(e)) / 2
(+self.options.date + +getMouseDate(data)) / 2
);
self.options.zoom++;
}

View file

@ -396,7 +396,6 @@ Ox.formatDateRangeDuration = function(start, end, utc) {
}
// advance the date by one unit
Ox['set' + parts[i]](date, Ox['get' + parts[i]](date, utc) + 1, utc);
Ox.print(key, '.....', date)
if (date <= dates[1]) {
// still within the range, add one unit
values[i] = (values[i] || 0) + 1;