Skip to content
Extraits de code Groupes Projets
Valider 36caa82b rédigé par Brieuc Dubois's avatar Brieuc Dubois
Parcourir les fichiers

Fix #107

parent 8b9e7a30
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -28,7 +28,7 @@ export default class User { ...@@ -28,7 +28,7 @@ export default class User {
private _ui_language: string | null; private _ui_language: string | null;
private _home_language: string | null; private _home_language: string | null;
private _target_language: string | null; private _target_language: string | null;
private _birthdate: number | null; private _birthdate: Date | null;
private _gender: string | null; private _gender: string | null;
private _calcom_link: string | null; private _calcom_link: string | null;
private _study_id: number | null; private _study_id: number | null;
...@@ -44,7 +44,7 @@ export default class User { ...@@ -44,7 +44,7 @@ export default class User {
ui_language: string | null, ui_language: string | null,
home_language: string | null, home_language: string | null,
target_language: string | null, target_language: string | null,
birthdate: number | null, birthdate: Date | null,
gender: string | null, gender: string | null,
calcom_link: string | null, calcom_link: string | null,
study_id: number | null, study_id: number | null,
...@@ -110,7 +110,7 @@ export default class User { ...@@ -110,7 +110,7 @@ export default class User {
return this._target_language; return this._target_language;
} }
get birthdate(): number | null { get birthdate(): Date | null {
return this._birthdate; return this._birthdate;
} }
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
import Typingtest from '$lib/components/tests/typingtest.svelte'; import Typingtest from '$lib/components/tests/typingtest.svelte';
import AvailableTutors from '$lib/components/users/availableTutors.svelte'; import AvailableTutors from '$lib/components/users/availableTutors.svelte';
import { browser } from '$app/environment'; import { browser } from '$app/environment';
import { formatToUTCDate } from '$lib/utils/date';
let current_step = 0; let current_step = 0;
...@@ -388,7 +389,7 @@ ...@@ -388,7 +389,7 @@
id="birthyear" id="birthyear"
name="birthyear" name="birthyear"
required required
bind:value={birthdate} on:change={(e) => (birthdate = formatToUTCDate(new Date(e.target.value, 1, 1)))}
> >
<option disabled selected value="">{$t('register.birthyear')}</option> <option disabled selected value="">{$t('register.birthyear')}</option>
{#each Array.from({ length: 82 }, (_, i) => i + 1931).reverse() as year} {#each Array.from({ length: 82 }, (_, i) => i + 1931).reverse() as year}
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter