From 83e752c8afb48f7a24f61cee1d463410544ab043 Mon Sep 17 00:00:00 2001 From: Mike Horn Date: Fri, 21 Mar 2014 16:32:28 -0700 Subject: [PATCH] extra sort field for datetime widgets --- app/utils/controls.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/utils/controls.js b/app/utils/controls.js index 7f53f4a8..8177b353 100644 --- a/app/utils/controls.js +++ b/app/utils/controls.js @@ -39,6 +39,8 @@ export default function dataFromControls (controls) { // add timezone to datetime values if (control.get('controlType.widget') === 'datetime') { value = moment(value).format(); + // add extra data for sorting + data['_sort_' + control.get('name')] = moment(value).unix(); } data[control.get('name')] = value;