Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DatePicker: fix enter validation #3864

Merged
merged 1 commit into from
Dec 6, 2024
Merged

Conversation

DavidFyon
Copy link
Contributor

@DavidFyon DavidFyon commented Dec 6, 2024

Description

<script setup lang="ts">
import DatePicker from '@/patterns/DatePicker/DatePicker.vue';
import { ref, provide } from 'vue';

const date = ref('');

const isValid = ref(false);
const formSubmitted = ref(false);
provide('formSubmitted', formSubmitted);

const send = () => {
	formSubmitted.value = true;
	if (isValid.value) {
		console.log('send');
		console.log(date.value);
	}
};
</script>

<template>
	<v-form ref="form" v-model="isValid" @submit.prevent="send">
		<DatePicker
			v-model="date"
			label="Date de rédaction (optionnel)"
			bg-color="white"
			outlined
		/>
		<v-btn type="submit">Submit</v-btn>
	</v-form>
</template>

Fix validation on enter

  • Ma Pull Request pointe vers la bonne branche
  • Mon code suit le style de code du projet
  • J'ai effectué une review de mon propre code
  • J'ai commenté mon code, en particulier dans les parties difficiles à comprendre
  • J'ai apporté les modifications correspondantes à la documentation
  • Mes modifications ne génèrent aucun nouveau warning
  • J'ai ajouté des tests qui prouvent que mon correctif est efficace ou que ma fonctionnalité fonctionne
  • Les tests unitaires passent localement avec mes modifications
  • J'ai mis à jour le fichier Changelog

@DavidFyon DavidFyon self-assigned this Dec 6, 2024
@DavidFyon DavidFyon changed the title fix enter on DatePicker DatePicker: fix enter on DatePicker Dec 6, 2024
@DavidFyon DavidFyon changed the title DatePicker: fix enter on DatePicker DatePicker: fix enter validation Dec 6, 2024
@DavidFyon DavidFyon linked an issue Dec 6, 2024 that may be closed by this pull request
@DavidFyon DavidFyon merged commit 71b8587 into v2-bridge Dec 6, 2024
2 checks passed
@DavidFyon DavidFyon deleted the fix/datepicker-enter branch December 6, 2024 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DatePicker: Pas d'update de la valeur si on presse 'enter'
2 participants