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

how can I input the value to the calendar control? #2926

Closed
xidianyaolu opened this issue Dec 11, 2018 · 2 comments
Closed

how can I input the value to the calendar control? #2926

xidianyaolu opened this issue Dec 11, 2018 · 2 comments

Comments

@xidianyaolu
Copy link

xidianyaolu commented Dec 11, 2018

Current behavior:

Now,I want to test a calendar like this :

you can refer to https://ant.design/components/date-picker/

Desired behavior:

I'd like to input to a calendar control ,how can I input the value ?
cy.get('.ant-calendar-range-picker.ant-input') .type('2018/12/12')

this doesn't work !

@jennifer-shehane
Copy link
Member

jennifer-shehane commented Dec 11, 2018

Type in range fields

it('types in range field', () => {
  cy.visit('https://ant.design/components/date-picker/')
  cy.get('.ant-calendar-range-picker-input').eq(0).click()
  cy.get('.ant-calendar-date-panel').within(() => {
    cy.get('.ant-calendar-range-left .ant-calendar-input')
      .type('2018/12/12')
    cy.get('.ant-calendar-range-right .ant-calendar-input')
      .type('2018/12/14')
  })
})

We recommend questions relating to how to use Cypress be asked in our community chat in the future. Issues in our GitHub repo are reserved for potential bugs or feature requests.

@xidianyaolu
Copy link
Author

dear jennifer, truly grateful for your help, cypress is great , it helps a lot ! hats off to your team @jennifer-shehane

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants