From a2a956005e417a2ae2ff4030f204e6b158c4fc1d Mon Sep 17 00:00:00 2001 From: nathangray Date: Tue, 2 Aug 2016 09:30:20 -0600 Subject: [PATCH] Add tooltip to datepicker Today button --- api/js/etemplate/et2_widget_date.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/js/etemplate/et2_widget_date.js b/api/js/etemplate/et2_widget_date.js index 94a1ae70fb..1ffbbf1cd6 100644 --- a/api/js/etemplate/et2_widget_date.js +++ b/api/js/etemplate/et2_widget_date.js @@ -150,6 +150,7 @@ String: A string in the user\'s date format, or a relative date. Relative dates } // Avoid collision of datepicker dialog with input field + var widget = this; this.input_date.datepicker('option', 'beforeShow', function(input, inst){ var cal = inst.dpDiv; setTimeout(function () { @@ -166,6 +167,10 @@ String: A string in the user\'s date format, or a relative date. Relative dates of: input }); } + // Add tooltip to Today/Now button + jQuery('[data-handler="today"]',cal).attr('title', + widget._type == 'date' ? egw.lang('Today') : egw.lang('Now') + ); },0); })