Search code examples
javascriptjqueryasp.netajaxjquery-jtable

Asp.net jTable time field type


I'm going to build an ASP.net webforms and I want to consume jTable.

I have a time(7) datatype in sqlserver, and I have to map this relation in jTable.

So, does jTable support time data type and I how can I implement it, and how can I validate it.


Solution

  • I have used HTML5 to solve the problem

    QuizStartTime: {
                            title: 'StartTime',
                            width: '30%',
                            input: function (data) {
                                if (data.record) {
                                    return '<input type="time" name="QuizStartTime" value="' + data.record.QuizStartTime + '"/>';
                                } else {
                                    return '<input type="time" name="QuizStartTime" value="08:00">';
                                }
                            }
                        }
    

    the if statement used to get the value from database in update state or put default value in add state