Solved

jquery timepicker multiple instance

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

What is a Lightbox? A Lightbox is the effect you see when you click, for example, an image and the screen fades out and up pops the same image but in its full size dimensions. There are lots of Lightbox effects for jQuery. Problem is they are a…
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)

708 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

14 Experts available now in Live!

Get 1:1 Help Now