views:

75

answers:

2

I have a large table with input boxes.

Three columns of these are dates/times (in unix format).

Im trying to find an easy to implement way of allowing the user to click on this box, being able to (graphically) select a date/time, and when done, sending the selection to a php script to make the physical changes of the data. (i can convert the date/time back to unix from here if necessary).

The caveat is that each input is named dynamically according to its row number.

Here is my script where i output the date fields

}elseif(in_array($j, array(19,33,54))){
    echo "<td><input type=text value=\"$value\" name=\"date$j\" class=med></td></td>";
+1  A: 

Try to integrate the jQuery datepicker, but what you need to do is some kind of ajax call to the PHP!

stoimen
+2  A: 

jQuery UI datepicker supports a great number of options and events including an on-select event. It's also possible to have a datepicker attached to a hidden input with a separate activation control, so there's no problem at all with using it for AJAX.

hobbs
how would i handle the problem of the multiple dynamic inputs?
Patrick
Could you be more specific about what the problem is? I don't see one. Each input would get its own datepicker, and you know what the input's name is, so just... do whatever you need to do.
hobbs
When i apply this to my page, only the first input triggers the datepicker. None of the other inputs work.
Patrick
Then you have an error in your code that doesn't relate directly to datepicker. Datepicker can be applied to as many elements as you like.
hobbs