Replace year/month picker with date picker on event calendar

Thanks for that demo, but I’m struggling to mimic it. I’m trying to implement it on my event calendar, but I’m running into a javascript error on the following:

myRange.setVal([startDate, endDate])

Specifically setVal. This function doesn’t seem to exist, so what am I missing?