From cb97259a3b2a152edc186a789544802ab0859eee Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Thu, 2 Apr 2015 14:58:50 +0000 Subject: [PATCH] Handle bad rounding / floating point math fun --- etemplate/js/et2_widget_date.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/etemplate/js/et2_widget_date.js b/etemplate/js/et2_widget_date.js index 1d82175c1f..7d8a6684e8 100644 --- a/etemplate/js/et2_widget_date.js +++ b/etemplate/js/et2_widget_date.js @@ -683,6 +683,9 @@ var et2_date_duration = et2_date.extend( value *= 60; break; } + // Minutes should be an integer. Floating point math. + value = Math.round(value); + switch(this.options.data_format) { case 'd':