Skip to content

Commit 28656f5

Browse files
committed
fix date input
1 parent 80f11f7 commit 28656f5

3 files changed

Lines changed: 13 additions & 5 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"@babel/plugin-transform-private-property-in-object": "^7.24.7",
99
"@emotion/react": "^11.11.4",
1010
"@emotion/styled": "^11.11.5",
11-
"@foerderfunke/matching-engine": "^1.1.4",
11+
"@foerderfunke/matching-engine": "^1.1.6",
1212
"@mui/icons-material": "^5.15.19",
1313
"@mui/material": "^5.15.19",
1414
"@mui/x-charts": "^7.6.2",

src/core/managers/matchingEngineManager.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ const matchingEngineManager = {
8686
}
8787
const userProfile = userManager.retrieveUserData(userId);
8888
const userProfileTurtle = await convertUserProfileToTurtle(userProfile);
89-
9089
return this.matchingEngineInstance.matching(
9190
userProfileTurtle,
9291
requirementProfiles.map(rp => expand(rp)),

src/ui/screens/question-pages/components/input-types/ProfileInputDate.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,26 @@ import { FormControl, Typography } from '@mui/material';
44
import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
55
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
66
import dayjs from 'dayjs';
7+
import 'dayjs/locale/en-gb';
78

89
const ProfileInputDate = ({ t, value, setValue, error }) => {
910

11+
const handleChange = (newValue) => {
12+
if (newValue && dayjs.isDayjs(newValue)) {
13+
setValue(newValue.format('YYYY-MM-DD'));
14+
} else {
15+
setValue(null);
16+
}
17+
};
18+
1019
return (
1120
<>
12-
<LocalizationProvider dateAdapter={AdapterDayjs}>
21+
<LocalizationProvider dateAdapter={AdapterDayjs} adapterLocale="en-gb">
1322
<FormControl>
1423
<DatePicker
1524
label={t('app.datafields.pickBday')}
16-
value={value ? dayjs(value) : null}
17-
onChange={(newValue) => setValue(newValue)}
25+
value={value ? dayjs(value, 'YYYY-MM-DD') : null}
26+
onChange={handleChange}
1827
sx={{
1928
'& .MuiInputLabel-root.Mui-focused': {
2029
color: 'blue.main',

0 commit comments

Comments
 (0)