When you need to automate a hotel, travel, or similar websites you need to deal with Date pickers (calendars), and sometimes it is a little bit difficult with automation to select a specific date on the Datepicker or calendar.
Let's deal Datepickers with WebdriverIO, Please do get familiar with different kinds of popup by visiting this site: http://www.mattkruse.com/javascript/calendarpopup/
Every application uses different kinds of calendars/date pickers, so it becomes different and hard to automate with a single strategy or using a single way with automation tools.
You can not write a reusable method easily which can be used to handle all types of calendars with WebdriverIO. So we have to use the javascript instead of depending on the WebdriverIO or WebdriberIO.
Now let's try to handle the calendar popup using WebdriverIO, when we use WebdriverIO we can select the date in different ways.
browser.executeScript("document.getElementById('datepicker').value='02/11/2019'");