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

It does not work in the table row form #81

Closed milacay closed 7 years ago

milacay commented 7 years ago

This Datepair plug-in is what I am looking for. However, there is an issue if the inputs for date are inside the table row. How can I make it works when the inputs in a separate rows with in the HTML table? Thanks.

I could not post the HTML table code here since it doesn't display correctly. Please see my post on stackoverflow.com http://stackoverflow.com/questions/39300745/datepair-input-element-inside-table-row

jonthornton commented 7 years ago

I can't reproduce the problem described in the SO post. You'll need to post a jsFiddle or some other working demo.

milacay commented 7 years ago

I have posted the code on jsFiddle as you suggested. Please take a look and let me know if I need to clarify anything.
(https://jsfiddle.net/milacay/6oht03y6/)

BTW, your plug-in script is great. I just need to make it work in the HTML form with table and it would be awesome.

Thank you,

jonthornton commented 7 years ago

Thanks, that helped. Looks like the problem was that the table didn't have an ID and wasn't get initialized with timepicker/datepicker/datepair. Here's an updated fiddle with the table working: https://jsfiddle.net/3rg9x7zt/

milacay commented 7 years ago

It works perfect now. Thank you so much.

jonthornton commented 7 years ago

Great!