Solved

jquery timepicker multiple instance

Posted on 2013-05-18
3
417 Views
Last Modified: 2013-05-28
im using jquery timepicker to create a timesheet. I need the Start Time and End Time.

The Start Time works, i can select the time just fine. However the End Time doesn't function.

Here is my code:


<script src="http://login.xxx.com/public/js/jquery-ui-1.10.3.min.js"></script>
<script src="http://login.xxx.com/public/js/plugins/timepicker/jquery-ui-timepicker-addon.js"></script>

<div class="control-group">
<label class="control-label" for="startTime">Start time</label>
   <div class="controls">
   <input class="timepicker" id="timepicker-basic" name="startTime" type="text" value="">
   </div>
</div>

<div class="control-group">
<label class="control-label" for="endTime">End time</label>
   <div class="controls">
   <input class="timepicker" id="timepicker-basic" name="endTime" type="text" value="">
   </div>
</div>

Open in new window

0
Comment
Question by:GTechForce
  • 2
3 Comments
 
LVL 44

Accepted Solution

by:
Rainer Jeschor earned 500 total points
ID: 39178192
Hi,
your elements need unique ids. Please set the ids to e.g. "startTime" and "endTime".
HTH
Rainer
0
 

Author Comment

by:GTechForce
ID: 39178208
you mean like this

<div class="control-group">
<label class="control-label" for="endTime">End time</label>
   <div class="controls">
   <input class="timepicker" id="endTime" name="endTime" type="text" value="">
   </div>
</div>

Open in new window

0
 
LVL 44

Expert Comment

by:Rainer Jeschor
ID: 39178215
Yes. I am currently on the road, so have only mobile access with no coding possibilities.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question