From 167c02d7731049a20699ba767cc2783a023bc86f Mon Sep 17 00:00:00 2001 From: utkarshcmu Date: Tue, 10 Nov 2015 04:53:42 -0800 Subject: [PATCH] Timepicker display fixed for now-* --- public/app/core/utils/rangeutil.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/app/core/utils/rangeutil.ts b/public/app/core/utils/rangeutil.ts index 1e64fcc0061..3fc4252ceaf 100644 --- a/public/app/core/utils/rangeutil.ts +++ b/public/app/core/utils/rangeutil.ts @@ -133,6 +133,10 @@ _.each(rangeOptions, function (frame) { return from.fromNow() + ' to ' + formatDate(range.to); } + if (!moment.isMoment(range.from) && !moment.isMoment(range.to)) { + return formatDate(dateMath.parse(range.from, true)) + ' to ' + formatDate(dateMath.parse(range.to, true)); + } + var res = describeTextRange(range.from); return res.display; }