datetimepicker for row editing

datetimepicker for row editing

shaishai Posts: 7Questions: 0Answers: 0
edited June 2011 in General
hi

i have seen that one can use the following code to make the columns editable by a datepicker:
[code]
$(document).ready(function() {
var table = $('#eventTable').dataTable({
"fnDrawCallback": function(){
$("#showtime").datetimepicker()
},
....
[/code]

my table is this:
[code]





















[/code]

but it doesnt work. double click still just opens the textfield without the picker.

what am i doing wrong?

Replies

  • shaishai Posts: 7Questions: 0Answers: 0
    it must be possible to adress the cells or not?
  • pimperishpimperish Posts: 17Questions: 0Answers: 0
    One problem is that multiple cells will have an id of "showtime". There is probably one cell in your table that has the datetimepicker. Try using class instead of id. i.e.:
    [code]
    $(document).ready(function() {
    var table = $('#eventTable').dataTable({
    "fnDrawCallback": function(){
    $(".showtime").datetimepicker()
    },
    ....
    [/code]
    and
    [code]
    ...
    ...
    ...
    [/code]
  • shaishai Posts: 7Questions: 0Answers: 0
    edited June 2011
    hi
    ive tried that and ive tried that with even setting just one of the columns

    [code]
    <%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
    <%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>



    $(document).ready(function() {
    var table = $('#eventTable').dataTable({
    "fnDrawCallback": function(){
    $(".showtime").datetimepicker();
    }
    }).makeEditable({
    sAddURL : "",
    sDeleteURL : "?courseID=",
    sUpdateURL: "?courseID="
    });
    });

























    [/code]

    its still not working.. i dont get it. it should be that simple..
This discussion has been closed.