Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8660689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:19:04+00:00 2026-06-12T16:19:04+00:00

I am using jQuery jTable in my PHP site to display table and to

  • 0

I am using jQuery jTable in my PHP site to display table and to add a record / modify a record to the table.

I have few fields which have time values. Unfortunately jTable supports only a datepicker, not a timepicker. Can anyone suggest how to add jQuery timepicker to the jTable?

I tried to add few JQuery Time Picker in the main JTable.js file. But I Think i’m adding wrongly. Since i’m new to jquery, i can’t figure out how to add the JQuery Time Picker Plugin

   <div id="ShiftTableContainer" style="width: 600px;"></div>
    <script type="text/javascript">

        $(document).ready(function () {

            //Prepare jTable
            $('#ShiftTableContainer').jtable({
                title: 'Shift',
                actions: {
                    listAction: '../m/ShiftActions.php?action=list',
                    createAction: '../m/ShiftActions.php?action=create',
                    updateAction: '../m/ShiftActions.php?action=update',
                    deleteAction: '../m/ShiftActions.php?action=delete'
                },
                fields: {
                    id: {
                        title: 'Shift Id',
                        width: '25%'
                    },
                    name: {
                        title: 'Shift Name',
                        width: '40%'
                    },
                    start_time: {
                        title: 'Start Time',
                        width: '75%',
                        input: function (data) {
                                var dt = data.record ? data.record.start_time : NULL;
                                return '<input type="text" style="width:200px" value="' + dt + '" />';
                            }
                        inputClass: 'timepicker'
                    },

                    end_time: {
                        title: 'End Time',
                        width: '75%',

                        //options: { '1': '101', '2': '102' }
                    },
                    description: {
                        title: 'Description',
                        width: '75%'
                    },
                    color: {
                        title: 'Color',
                        width: '75%',
                        //options: { '1': '101', '2': '102' }
                    },
                    break_schedule: {
                        title: 'Break Schedule',
                        width: '75%',
                    }
                }

            });

            $('#ShiftTableContainer').jtable('load');
        });



    </script>
            <script>
            $(function(){
                  $("input.timepicker").datetimepicker();
                });     

    </script>   
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T16:19:05+00:00Added an answer on June 12, 2026 at 4:19 pm

    I tried like this and its working fine. I updated JQuery and JQuery UI to the latest version. Imported it in my php along with the timepicker plugin i am using. I did some modification in my code. Here is the working code.

            <script type="text/javascript">
    
            $(document).ready(function () {
    
                //Prepare jTable
                $('#ShiftTableContainer').jtable({
                    title: 'Shift',
                    actions: {
                        listAction: '../m/ShiftActions.php?action=list',
                        createAction: '../m/ShiftActions.php?action=create',
                        updateAction: '../m/ShiftActions.php?action=update',
                        deleteAction: '../m/ShiftActions.php?action=delete'
                    },
                    fields: {
                        id: {
                            key: true,
                            edit: false,
                            title: 'Shift Id',
                            width: '25%'
                        },
                        name: {
                            title: 'Shift Name',
                            width: '40%'
                        },
                        start_time: {
                            title: 'Start Time',
                            width: '75%'
                        },
    
                        end_time: {
                            title: 'End Time',
                            width: '75%'
                        },
                        description: {
                            title: 'Description',
                            width: '75%'
                        },
                        color: {
                            title: 'Color',
                            width: '75%',
                            //options: { '1': '101', '2': '102' }
                        },
                        break_schedule: {
                            title: 'Break Schedule',
                            width: '75%',
                        }
                    },
                    formCreated: function (event, data) 
                    {
                        var $input_start_time = data.form.find ('input[name="start_time"]');
                        $input_start_time.addClass("time");
                        $input_start_time.timepicker();
    
                        var $input_end_time = data.form.find ('input[name="end_time"]');
                        $input_end_time.addClass("time");
                        $input_end_time.timepicker();
    
                    }
                });
    
                $('#ShiftTableContainer').jtable('load');
    
            });
    
    
    
        </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Jquery Ajax i have an entry script index.php This script lets the user
Using jQuery UI I have two radio buttons, Approve/Reject, which I would like to
Using jQuery, how would you find elements which have a particular style (eg: float:
Using Jquery TableSorter, I am creating a custom parser to sort elapsed time <td>
using jquery's .post i send do my php code an object that with var_dump
Using Jquery , I have an array result [<a href=><img src=image1></a>,<a href=><img src=image2></a>] if
Using jQuery. I have the following html: <input type=checkbox name='something' value='v1' /> All the
Using jQuery Autocomplete, according to the docs you have to do the following to
Using Jquery AJAX to get a value from a PHP script. This line works
(using jquery) I have the following function $(function() { $('tr.parent') .css(cursor,pointer) .attr(title,Click to expand/collapse)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.