jonthornton / Datepair.js

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

Is Container required? #7

Closed JamoCA closed 10 years ago

JamoCA commented 10 years ago

I have situation where I'd like to integrate datepair within a small table that has a "date start" and "date end" column. I can't treat individual table cells as a container. (Would the cell row need to be treated as the container?)

Is there any way to bind start & end fields without requiring them to reside in a single container? (I can't change my layout in order to accommodate this requirement.)

Here's an example using the Foundation datepicker: http://foundation-datepicker.peterbeno.com/example/example.html (But I prefer your alternate UI support as I'm using Pikaday & Date.js)

Thanks.

jonthornton commented 10 years ago

The start and end inputs do need to share a common parent, but it doesn't have to be the immediate parent element. A TR would work, or even the BODY element if it didn't contain any orther start and end inputs. So they don't have to reside in the same container, but they do have to have some sort of common ancestor.