I want to validate time format by putting time picker on my form, then i search for it in Internet and i found it here. I follow the steps, but it is did't work.

In my page i just want to receipt time (hh:mm). i need it to validate the time put by user.

Anybody please help me using that timepicker. That time picker suitable for my form.
What is the required library for that timepicker?
If I may request, could anybody give me the code, please...

I'm a new person in web development, and i'm interest.
Help me please...

I have use the timepicker before and it works very well.

You will need the jQuery javascript library and the jQuery-ui javascript library. They both will come i a package from http://jqueryui.com/

Then you will need to add them to the head tag of your page.

<head>       
        <link type="text/css" href="css/ui-lightness/jquery-ui-1.8.21.custom.css" rel="stylesheet" />
        <style type="text/css">
            /* css for timepicker */
            .ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
            .ui-timepicker-div dl { text-align: left; }
            .ui-timepicker-div dl dt { height: 25px; margin-bottom: -25px; }
            .ui-timepicker-div dl dd { margin: 0 10px 10px 65px; }
            .ui-timepicker-div td { font-size: 90%; }
            .ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0;}
        </style>
        <script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
        <script type="text/javascript" src="js/jquery-ui-1.8.21.custom.min.js"></script>
        <script type="text/javascript" src="js/jquery-ui-timepicker-addon.js"></script>
        <script type="text/javascript">

            $(function(){
                //#example2 is the id of the textbox you are using for the timepicker.
                $('#example2').datetimepicker({
                    ampm: true
                });
            }
</head>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.