onClick() first argument should be a date object instead of a timestamp
More bugfixes