Filling date field with Selenium WebDriver

I am trying to fill out a registration form using Selenium for practice as I am beginning to familiarize myself with this library.

It is the registration form on this website:

What I am currently trying

I start with this:

from selenium import webdriver

driver = webdriver.Chrome()

Over there, I click on the signup button with the data-target attribute set to "#signupM" using a css selector for the same:


I then set up some dummy values for the fields:

from phone_gen import PhoneNumber

name = "John Doe"
dob = "02-01-1990"
phone_number = PhoneNumber("India").get_number().replace("+91", "")
email_address = f"{phone_number}"

I wait for the name field, and fill it:

from import By
from import WebDriverWait
from import expected_conditions as EC

name_field = WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, 'input[name="signup_name"]')))

Then phone number and email address:

phone_number_field = driver.find_element_by_css_selector('input[name="signup_mobile"]')

email_addr_field = driver.find_element_by_css_selector('input[name="signup_email"]')

Everything up until here works fine, exactly as expected, but when I try to fill in the Date of Birth field, I face issues:

dob_field = driver.find_element_by_css_selector('input[name="signup_dob"]')

Issues I face

  1. Date of birth field is not filled.
  2. It throws an error, selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable
  3. I am unable to submit the form with date of birth not filled.

Ways I have tried to debug

  1. Rechecked the CSS Selector
  2. Waited for the data-of-birth field to be interactable using WebDriverWait
  3. Instead of filling in the text, I tried interacting with the popup that shows up when I click the field (I think I have to do this, but don’t know how.)

Questions which may seem like duplicates but are not:

Select Particular Date using Python Selenium (Rollover dates)

Using Selenium on calendar date picker

Interacting with pop-up boxes using selenium in python

Thank you for taking the time to read this question. I have given all the details that came to my mind while writing this. Excuse my poor english; I am german by birth.


I get why it may not be working. The website is using a particular javascript library called datedropper. Thus the input element for the date is in the readonly format.

I think you can resolve it by doing:

js_code = "document.querySelector('input[name=signup_dob]').value =" 
driver.execute_script(js_code + your_date)

EDIT: Not quite sure the js code is gonna work. It might need some editing