fix(date) : ouvre le popover au clic sur le picto calendrier
L'icône calendrier (overlay absolu) interceptait le clic sans le traiter et ne le laissait pas retomber sur le @click de l'input. Ajout d'un handler onFieldClick sur l'icône (+ cursor-pointer). Couvre Date, DateTime, DateRange, DateWeek via le CalendarField partagé. La croix d'effacement garde son comportement (efface, n'ouvre pas). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -73,6 +73,18 @@ describe('MalioDate', () => {
|
||||
expect(wrapper.find('[data-test="popover"]').exists()).toBe(true)
|
||||
})
|
||||
|
||||
it('opens on calendar icon click', async () => {
|
||||
const wrapper = mountDate()
|
||||
await wrapper.get('[data-test="calendar-icon"]').trigger('click')
|
||||
expect(wrapper.find('[data-test="popover"]').exists()).toBe(true)
|
||||
})
|
||||
|
||||
it('opens on calendar icon click in editable mode', async () => {
|
||||
const wrapper = mountDate({editable: true})
|
||||
await wrapper.get('[data-test="calendar-icon"]').trigger('click')
|
||||
expect(wrapper.find('[data-test="popover"]').exists()).toBe(true)
|
||||
})
|
||||
|
||||
it('opens on the current month when there is no value', async () => {
|
||||
const wrapper = mountDate()
|
||||
await wrapper.get('[data-test="date-input"]').trigger('click')
|
||||
|
||||
Reference in New Issue
Block a user