fix: date year picker (#84)
Release / release (push) Successful in 1m18s

| Numéro du ticket | Titre du ticket |
|------------------|-----------------|
|                  |                 |

## Description de la PR

## Modification du .env

## Check list

- [ ] Pas de régression
- [ ] TU/TI/TF rédigée
- [ ] TU/TI/TF OK
- [ ] CHANGELOG modifié

---------

Co-authored-by: admin malio <malio@yuno.malio.fr>
Co-authored-by: THOLOT DECHENE Matthieu <matthieu@yuno.malio.fr>
Co-authored-by: matthieu <matthieu@yuno.malio.fr>
Reviewed-on: #84
Co-authored-by: tristan <tristan@yuno.malio.fr>
Co-committed-by: tristan <tristan@yuno.malio.fr>
This commit was merged in pull request #84.
This commit is contained in:
2026-06-22 09:29:59 +00:00
committed by Autin
parent 251c939ba0
commit 28705c8285
21 changed files with 1443 additions and 24 deletions
@@ -4,7 +4,7 @@
type="button"
data-test="header-prev"
class="ml-2 flex self-start rounded"
:aria-label="viewMode === 'days' ? 'Mois précédent' : 'Année précédente'"
:aria-label="prevLabel"
@click="emit('prev')"
>
<Icon
@@ -32,7 +32,7 @@
type="button"
data-test="header-next"
class="mr-2 flex self-start rounded"
:aria-label="viewMode === 'days' ? 'Mois suivant' : 'Année suivante'"
:aria-label="nextLabel"
@click="emit('next')"
>
<Icon
@@ -51,7 +51,7 @@ import {Icon} from '@iconify/vue'
defineOptions({name: 'MalioDateCalendarHeader'})
const props = defineProps<{
viewMode: 'days' | 'months'
viewMode: 'days' | 'months' | 'years'
currentMonth: number
currentYear: number
}>()
@@ -63,8 +63,21 @@ const emit = defineEmits<{
const monthsLong = ['janvier', 'février', 'mars', 'avril', 'mai', 'juin',
'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre']
// Libellé constant « Mois Année » dans toutes les vues (jours/mois/années) :
// la grille affichée en dessous indique le niveau courant.
const label = computed(() => {
const name = monthsLong[props.currentMonth]
return `${name.charAt(0).toUpperCase()}${name.slice(1)} ${props.currentYear}`
})
const prevLabel = computed(() =>
props.viewMode === 'days' ? 'Mois précédent'
: props.viewMode === 'months' ? 'Année précédente'
: 'Période précédente',
)
const nextLabel = computed(() =>
props.viewMode === 'days' ? 'Mois suivant'
: props.viewMode === 'months' ? 'Année suivante'
: 'Période suivante',
)
</script>