From c8f98f3fee762b7b07f125ad59f28a06d3fb934b Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Mon, 7 May 2018 16:57:37 +0200 Subject: [PATCH] Take user's number format into account when set date duration widget. Fixes duration widget doesn't accept "," as decimal separator in Firefox. --- api/js/etemplate/et2_widget_date.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/js/etemplate/et2_widget_date.js b/api/js/etemplate/et2_widget_date.js index b934215286..0716761f0f 100644 --- a/api/js/etemplate/et2_widget_date.js +++ b/api/js/etemplate/et2_widget_date.js @@ -722,7 +722,7 @@ var et2_date_duration = (function(){ "use strict"; return et2_date.extend( .addClass('et2_date_duration'); this.duration = jQuery(document.createElement("input")) .addClass('et2_date_duration') - .attr({type: 'number', size: 3, step:this.options.step}); + .attr({type: 'number', size: 3, step:this.options.step, lang: this.egw().preference('number_format')[0] === "," ? "en-150": "en-001"}); this.node.append(this.duration); if(this.options.display_format.length > 1)