Solved

jquery timepicker multiple instance

Posted on 2013-05-18
3
405 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
This article discusses how to create an extensible mechanism for linked drop downs.
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…

914 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now