Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

jquery timepicker multiple instance

Posted on 2013-05-18
3
Medium Priority
?
463 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
  • 2
3 Comments
 
LVL 44

Accepted Solution

by:
Rainer Jeschor earned 2000 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article discusses how to create an extensible mechanism for linked drop downs.
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)
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…
Suggested Courses

963 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