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 - Règles notAfterToday/notBeforeToday ne fonctionnent pas avec date-format-return #3684

Closed
lpercin-N opened this issue Aug 6, 2024 · 0 comments · Fixed by #3688
Assignees

Comments

@lpercin-N
Copy link

Description

Les règles de validation notAfterToday et notBeforeToday ne fonctionnent pas avec date-format-return.

Comment reproduire

  1. Créer un champ DatePicker
  2. Ajouter la règle notAfterToday et/ou notBeforeToday
  3. Ajouter la prop date-format-return avec un format différent que celui de base

Reproduction minimale

<script setup lang="ts">
import {DatePicker, notAfterToday} from '@cnamts/synapse-bridge'
import {SubmitEventPromise} from "vuetify";

const date = ref(undefined)
const dateFormatted = ref(undefined)

async function submitForm(event: SubmitEventPromise): Promise<void> {
	const submitResult = await event
	if (submitResult.valid) {
		alert("valid")
	}
}
</script>

<template>
	<v-form
		@submit.prevent="submitForm"
	>
		<DatePicker v-model="date" :rules="[notAfterToday]" label="Working"/>
		<DatePicker v-model="dateFormatted" :rules="[notAfterToday]" date-format-return="YYYY-MM-DD" label="Not working"/>

		<button type="submit">Rechercher</button>
	</v-form>
</template>

Comportement attendu

Le champ avec le format de retour différent est bloqué selon la règle.

Captures d'écran

image

Projet

Refonte RENTE

Contacts

lpercin@norsys.fr - Dev. Front refonte Rentes

@DavidFyon DavidFyon added this to the v2.0.0-bridge.x milestone Aug 6, 2024
@VachetVirginie VachetVirginie linked a pull request Aug 7, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants