jonthornton / Datepair.js

A javascript plugin for intelligently selecting date and time ranges, inspired by Google Calendar.
https://www.jonthornton.com/Datepair.js
358 stars 87 forks source link

End Date not updating when using an input group #48

Closed Efiware closed 9 years ago

Efiware commented 9 years ago

Hi

I'm trying to use Datepair and have quite fast set up a working demo like the ones in your documentation. But when a want to add a button to the datepicker fields, the end date is not updated when the start date is modified.

See this fiddle: http://jsfiddle.net/ysfqbeb0/

Am I doing something wrong, or is wrapping the input with a div not supported?

jonthornton commented 9 years ago

The start/end time/date classes need to be on the input elements themselves. In your fiddle they're on the container divs. As long as those classes are directly applied to the inputs you can add as much markup as you like :)