From c79c9bcbe01e73b16af28fea15fccc7a712e97b0 Mon Sep 17 00:00:00 2001 From: Warren Parad Date: Wed, 1 Mar 2017 21:03:53 +0100 Subject: [PATCH] Fix Month storage. --- content/update/UpdateController.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/update/UpdateController.js b/content/update/UpdateController.js index ea25c20..d3cad60 100644 --- a/content/update/UpdateController.js +++ b/content/update/UpdateController.js @@ -34,7 +34,7 @@ function($scope, $anchorScroll, $routeParams, loginStatusProvider, eventHandler, $scope.selectedDobYear = null; $scope.selectedDobMonth = null; $scope.selectedDobDay = null; - $scope.verificationMonths = $scope.months; + $scope.verificationMonths = Array.apply(null, {length:12}).map(Number.call, Number).map(function(i) { return i + 1; }); $scope.verificationYears = [0, 1, 2, 3, 4, 5].map(function(i) { return currentYear - i; }); $scope.SignInButtonClick = function() { if($scope.UserAuthenticated) { @@ -122,7 +122,7 @@ function($scope, $anchorScroll, $routeParams, loginStatusProvider, eventHandler, } var userDetails = { - dob: new Date($scope.selectedDobYear, $scope.selectedDobMonth, $scope.selectedDobDay).toISOString(), + dob: moment($scope.selectedDobYear + '-' + $scope.selectedDobMonth + '-' + $scope.selectedDobDay, 'YYYY-MM-DD').format(), name: $scope.name, clinicInfo: $scope.clinicInfo, clinicName: $scope.clinicName,