# HG changeset patch # User Dustin Demuth # Date 1431445298 -7200 # Node ID 4c1101f0ba99ea393412087f2c69be1c1b15e08a # Parent b3e38a2a25c7c68d0d468b5f1dfd868dfd483ea8 Serialize Date to DayOfYear when writing/saving diff -r b3e38a2a25c7 -r 4c1101f0ba99 app/model/Messprogramm.js --- a/app/model/Messprogramm.js Tue May 12 17:30:59 2015 +0200 +++ b/app/model/Messprogramm.js Tue May 12 17:41:38 2015 +0200 @@ -67,6 +67,11 @@ } return new Date(v); }, + serialize: function(value) { + if (value instanceof Date && !isNaN(value.valueOf())) { + return value.getDOY(); + } + } }, { name: 'gueltigBis', type: 'date', @@ -76,6 +81,11 @@ } return new Date(v); }, + serialize: function(value) { + if (value instanceof Date && !isNaN(value.valueOf())) { + return value.getDOY(); + } + } }, { name: 'probeNehmerId' }, {