P粉5614384072023-08-30 13:29:54
This will depend on the exact date picker you use in your application, or more precisely, how the user interacts with it.
For example, if it was a vue2-datepicker, you might just close the control to trigger its update.
cy.get('#dispatch-date') .type('{selectAll}22-10-2022') // {selectAll} if not empty .trigger('keydown', {keyCode: 9, which: 9}) cy.get('#dispatch-date') .should('have.value', '22-10-2022')
Note that clicking the element will close the selector, but the value will not be updated to the v-model.