← Back to library
Cypressformsbeginnerv10+
Fill a date input
Type an ISO date value into a native <input type='date'> field.
1it('fills a native date input', () => {
2 cy.visit('/booking');
3
4 // ISO 8601 format is required by native date inputs
5 cy.get('input[type="date"][name="check-in"]')
6 .type('2025-08-15')
7 .should('have.value', '2025-08-15');
8
9 cy.get('[type="submit"]').click();
10 cy.contains('Aug 15, 2025').should('be.visible');
11});#date#input#type#ISO