Skip to content

Commit

Permalink
#1237 | Store date of birth and registration date without timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
vinayvenu committed Dec 21, 2023
1 parent 9dc21d2 commit 007c665
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
14 changes: 7 additions & 7 deletions packages/openchs-android/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/openchs-android/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"lodash": "4.17.21",
"moment": "2.29.4",
"native-base": "3.4.9",
"openchs-models": "1.31.5",
"openchs-models": "1.31.6",
"prop-types": "15.8.1",
"react": "18.2.0",
"react-native": "0.72.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import QuickFormEditingActions from "../common/QuickFormEditingActions";
import TimerActions from "../common/TimerActions";
import TaskService from "../../service/task/TaskService";
import General from '../../utility/General';
import moment from 'moment';

export class PersonRegisterActions {
static getInitialState(context) {
Expand Down Expand Up @@ -67,7 +68,7 @@ export class PersonRegisterActions {

static enterRegistrationDate(state, action) {
const newState = state.clone();
newState.individual.registrationDate = new Date(action.value);
newState.individual.registrationDate = moment(new Date(action.value)).startOf('day').toDate();
newState.handleValidationResult(newState.individual.validateRegistrationDate());
return newState;
}
Expand Down

0 comments on commit 007c665

Please sign in to comment.