Solved

jquery timepicker multiple instance

Posted on 2013-05-18
3
439 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:Brad Nelson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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:Brad Nelson
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

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

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

In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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)
Suggested Courses

617 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