Many years. When cars and vans first began to be used in the early 1900's there were very popular until the quicker to recharge petrol cars and the Henry Ford production line won out over them.
The odd EV has made an appearance from manufacturers through the 20th century as speculative projects.
It wasn't until the 21 Century that EV's were mass-sold again, starting properly with the highway-capable models, and the large-scale production of the lithium ion battery. Cars such as the Tesla Roadster in 2004, and the Nissan Leaf in 2010.