Note that there are some explanatory texts on larger screens.

plurals
  1. POShowing Bootstrap Timepicker on Focus
    primarykey
    data
    text
    <p>I am using jdewit's Bootstrap-Timepicker and there is an appended icon that triggers the appearance of the timepicker. My users are complaining and asking that the timepicker appear when the field received focus. There is no mention in the documentation so I was hoping someone would know how to achieve this.</p> <p>My code is:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;!--[if lt IE 9]&gt;&lt;html class="fixIE no-js"&gt;&lt;![endif]--&gt; &lt;html lang="en" class="no-js"&gt; &lt;head&gt; &lt;meta charset="utf-8"&gt; &lt;title&gt;CMS - Create Assignment&lt;/title&gt; &lt;link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.2/css/bootstrap.css"&gt; &lt;link rel="stylesheet" type="text/css" href="http://www.edrpo.com/assets/bootstrap-time-picker/css/bootstrap-timepicker.min.css" media="screen,print" /&gt; &lt;script src="http://www.edrpo.com/assets/js/jquery-1.8.3.min.js"&gt;&lt;/script&gt; &lt;script src="http://www.edrpo.com/assets/js/modernizr.js"&gt;&lt;/script&gt; &lt;script src="http://www.edrpo.com/assets/js/jquery.maskedinput-1.3.min.js"&gt;&lt;/script&gt; &lt;script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.2/js/bootstrap.min.js"&gt;&lt;/script&gt; &lt;script src="http://www.edrpo.com/assets/bootstrap-time-picker/js/bootstrap-timepicker.min.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="wholePage"&gt; &lt;link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,600,700,800' rel='stylesheet' type='text/css'&gt; &lt;div id="header"&gt; &lt;a href="http://www.edrpo.com/webster/prop_home" title="Logo"&gt; &lt;img src="http://www.edrpo.com/assets/images/banner.png" border="0" alt="WEBster Logo"/&gt; &lt;/a&gt; &lt;/div&gt; &lt;!--END header DIV--&gt; &lt;div id="mainContentHome"&gt; &lt;div id="theEditor"&gt; &lt;h2 style="font:bold 16px Verdana; color:#076324;padding-left:70px;"&gt; NEW RESIDENT STAFF ASSIGNMENT &lt;/h2&gt; &lt;br&gt;&lt;br&gt; &lt;div id="frmAddAssignment" style="width:70%;margin-left:80px;padding:20px 0px 20px 100px;border:2px solid #076324;"&gt; &lt;form action="http://www.edrpo.com/staffer/create_assignment_handler" method="post" accept-charset="utf-8" id="frmAddAss"&gt; &lt;input type="hidden" name="propNumber" value="300" /&gt; &lt;label for="location"&gt;Assignment Location:&lt;/label&gt; &lt;select name="location" style="width:80%;"&gt; &lt;option value="0"&gt;Please Select ...&lt;/option&gt; &lt;option value="4"&gt;Arena Conceirge&lt;/option&gt; &lt;option value="5"&gt;Launch Room&lt;/option&gt; &lt;option value="1"&gt;President's Mansion&lt;/option&gt; &lt;option value="2"&gt;Training Center Front Desk&lt;/option&gt; &lt;/select&gt; &lt;br&gt;&lt;br&gt; &lt;label for="day"&gt;Assignment Day:&lt;/label&gt; &lt;select name="day" style="width:80%;"&gt; &lt;option value="-"&gt;Please Select ...&lt;/option&gt; &lt;option value="0"&gt;Sunday&lt;/option&gt; &lt;option value="1"&gt;Monday&lt;/option&gt; &lt;option value="2"&gt;Tuesday&lt;/option&gt; &lt;option value="3"&gt;Wednesday&lt;/option&gt; &lt;option value="4"&gt;Thursday&lt;/option&gt; &lt;option value="5"&gt;Friday&lt;/option&gt; &lt;option value="6"&gt;Saturday&lt;/option&gt; &lt;/select&gt; &lt;br&gt;&lt;br&gt; &lt;label for="start"&gt;Assignment Start Time:&lt;/label&gt; &lt;div id="tmStart" class="input-append bootstrap-timepicker"&gt; &lt;input type="text" id="txStart" name="start"&gt; &lt;span class="add-on"&gt;&lt;i class="icon-time"&gt;&lt;/i&gt;&lt;/span&gt; &lt;/div&gt; &lt;br&gt;&lt;br&gt; &lt;label for="duration"&gt;Duration (in hours): Use can enter ".5" for a half hour (6.5)&lt;/label&gt; &lt;input type="text" name="duration" value="" style="width:78%;" /&gt; &lt;br&gt;&lt;br&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;/div&gt; &lt;!-- END ajaxAddArtist DIV --&gt; &lt;br&gt;&lt;br&gt; &lt;p style='text-align:center;'&gt;&lt;input type="image" name="submit" value="" src="http://www.edrpo.com/assets/images/create.png" /&gt;&lt;/p&gt; &lt;/div&gt;&lt;!-- END theEditor DIV --&gt; &lt;div id="footer"&gt; &lt;hr style='width:85%;color:#cdcdcd;' /&gt;&lt;img src="http://www.edrtrust.com/images/siteAssets/logo.png" alt=""/&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href='mailto:jgravois@edrtrust.com;lwassmer@edrtrust.com'&gt;Email the Web Team&lt;/a&gt; &lt;/div&gt; &lt;!--END footer DIV--&gt; &lt;/div&gt; &lt;!--END wholePage DIV--&gt; &lt;script&gt; (function() { $('#txStart').timepicker(); })(); // end self-invoking anonymous function &lt;/script&gt; &lt;script&gt; $("#txStart").on("focus", function() { return $(this).timepicker("showWidget"); }); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>Thanks for the assist!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload