From: Dietmar Maurer Date: Mon, 27 Mar 2017 07:43:02 +0000 (+0200) Subject: add format_expire() utility method X-Git-Url: https://git.proxmox.com/?p=proxmox-widget-toolkit.git;a=commitdiff_plain;h=2d0153a5ad86ac019dc8c1dc12387ff4f91ced25 add format_expire() utility method --- diff --git a/Utils.js b/Utils.js index 1aff39f..de6e305 100644 --- a/Utils.js +++ b/Utils.js @@ -79,6 +79,13 @@ Ext.define('Proxmox.Utils', { utilities: { return value ? Proxmox.Utils.enabledText : Proxmox.Utils.disabledText; }, + format_expire: function(date) { + if (!date) { + return Proxmox.Utils.neverText; + } + return Ext.Date.format(date, "Y-m-d"); + }, + compute_min_label_width: function(text, width) { if (width === undefined) { width = 100; }