Skip to content

Commit

Permalink
release 0.1.3 - Fixed a bug for when input Id had a dot in it, it was…
Browse files Browse the repository at this point in the history
… getting double escaped when it should not.
  • Loading branch information
fgelinas committed Apr 13, 2011
1 parent 928fb69 commit 8a97634
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 68 deletions.
57 changes: 28 additions & 29 deletions index.html
Expand Up @@ -3,13 +3,13 @@
<head>
<title>jQuery UI Time Picker by Francois Gelinas</title>
<link rel="stylesheet" href="ui-lightness/jquery-ui-1.8.7.custom.css" type="text/css" />
<link rel="stylesheet" href="jquery-ui-timepicker.css?v=0.1.2" type="text/css" />
<link rel="stylesheet" href="jquery-ui-timepicker.css?v=0.1.3" type="text/css" />



<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="jquery.ui.core.js"></script>
<script type="text/javascript" src="jquery.ui.timepicker.js?v=0.1.2"></script>
<script type="text/javascript" src="jquery.ui.timepicker.js?v=0.1.3"></script>
<style type="text/css">
/* some styling for the page */
body { font-size: 10px; /* for the widget natural size */}
Expand All @@ -25,16 +25,31 @@
<body>
<div id="content">


<div style="float: right; padding: 20px; font-size: 10px;">
<div id="floating_timepicker">

</div>
<script>
$(document).ready(function() {
$('#floating_timepicker').timepicker({
onSelect: function(time, inst) {
$('#floating_selected_time').html('You selected ' + time);
}
});
});
</script>
<span id="floating_selected_time">
</span>
</div>

<h1>jQuery UI Timepicker</h1>

<h2>What is this?</h2>
<p>
This is a jQuery UI time picker plugin build to match with other official jQuery UI widgets like the date picker.
<br />

Based on the existing date picker, this plugin will integrate nicely with your form and use your selected jQuery UI theme.
<br />

The plugin is very easy to integrate in your form for you time (hours / minutes) inputs.
</p>

Expand Down Expand Up @@ -77,10 +92,11 @@ <h2>Examples : </h2>

<div>
Default time picker :
<input type="text" style="width: 70px;" id="timepicker_1" value="" />
<input type="text" style="width: 70px;" id="some.timepicker_1" value="" />
<script type="text/javascript">
// for the test I use an id with a . char to fix bug
$(document).ready(function() {
$('#timepicker_1').timepicker();
$("#some\\.timepicker_1").timepicker();
});
</script>

Expand All @@ -90,25 +106,6 @@ <h2>Examples : </h2>

<hr />

<div style="display: none"> <!-- Too many examples already -->
Time picker with "h" time separator :
<input type="text" style="width: 70px;" id="timepicker_2" value="09h45" />
<script type="text/javascript">
$(document).ready(function() {
$('#timepicker_2').timepicker({
timeSeparator: 'h'
})
});
</script>

<a onclick="$('#script_2').toggle(200)">[Show code]</a>
<pre id="script_2" style="display: none" class="code"> $('#timepicker').timepicker({
timeSeparator: 'h:'
});</pre>

<hr />
</div>

<div>
Time picker with period (AM/PM) in input and without hours leading 0s :
<input type="text" style="width: 70px;" id="timepicker_4" value="7:30 PM" />
Expand Down Expand Up @@ -405,7 +402,7 @@ <h2>Requirements : </h2>
</li>

<li>
<a href="jquery.ui.timepicker.js?v=0.1.2">
<a href="jquery.ui.timepicker.js?v=0.1.3">
jquery.ui.timepicker.js
</a>
</li>
Expand All @@ -419,13 +416,15 @@ <h2>Requirements : </h2>

</ul>

Get the release package here : <a href="releases/jquery-ui-timepicker-0.1.2.zip">jquery-ui-timepicker-0.1.2.zip</a>
Get the release package here : <a href="releases/jquery-ui-timepicker-0.1.3.zip">jquery-ui-timepicker-0.1.3.zip</a>

<hr />
<!-- =============================================================================================================== -->
<h2>Releases :</h2>
<dl>

<dt>0.1.3 - April 12, 2011</dt>
<dd>Fixed a bug for when input Id had a dot in it, it was getting double escaped when it should not. (Thanks Zdenek Machac)</dd>

<dt>0.1.2 - April 11, 2011</dt>
<dd>So in 0.1.1 I created a bug that made timepicker changes the location hash, well not i'ts fixed. (Thanks Lucas Falk) </dd>

Expand Down
10 changes: 5 additions & 5 deletions jquery.ui.timepicker.js
@@ -1,5 +1,5 @@
/*
* jQuery UI Timepicker 0.1.2
* jQuery UI Timepicker 0.1.3
*
* Copyright 2010-2011, Francois Gelinas
* Dual licensed under the MIT or GPL Version 2 licenses.
Expand Down Expand Up @@ -40,7 +40,7 @@

(function ($, undefined) {

$.extend($.ui, { timepicker: { version: "0.1.2"} });
$.extend($.ui, { timepicker: { version: "0.1.3"} });

var PROP_NAME = 'timepicker';
var tpuuid = new Date().getTime();
Expand Down Expand Up @@ -530,7 +530,7 @@
}

if (enabled) {
html = '<td class="ui-timepicker-hour-cell" data-timepicker-instance-id="#' + inst.id + '" data-hour="' + hour.toString() + '">' +
html = '<td class="ui-timepicker-hour-cell" data-timepicker-instance-id="#' + inst.id.replace("\\\\","\\") + '" data-hour="' + hour.toString() + '">' +
'<a href="#timepick" class="ui-state-default ' +
(hour == inst.hours ? 'ui-state-active' : '') +
'">' +
Expand Down Expand Up @@ -561,7 +561,7 @@
}

if (enabled) {
html = '<td class="ui-timepicker-minute-cell" data-timepicker-instance-id="#' + inst.id + '" data-minute="' + minute.toString() + '" >' +
html = '<td class="ui-timepicker-minute-cell" data-timepicker-instance-id="#' + inst.id.replace("\\\\","\\") + '" data-minute="' + minute.toString() + '" >' +
'<a href="#timepick" class="ui-state-default ' +
(minute == inst.minutes ? 'ui-state-active' : '') +
'" >' +
Expand Down Expand Up @@ -952,7 +952,7 @@
$.timepicker = new Timepicker(); // singleton instance
$.timepicker.initialized = false;
$.timepicker.uuid = new Date().getTime();
$.timepicker.version = "0.1.2";
$.timepicker.version = "0.1.3";

// Workaround for #4055
// Add another global to avoid noConflict issues with inline event handlers
Expand Down
72 changes: 38 additions & 34 deletions releases.txt
@@ -1,25 +1,32 @@

As it is a timepicker, I inspired most of the code from the datepicker
Francois Gelinas - Nov 2010
Francois Gelinas - first release : Nov 2010

Release 0.0.2 - Jan 6, 2011
Updated to include common display options for USA users
Stephen Commisso - Jan 2011

release 0.0.3 - Jan 8, 2011
Re-added a display:none on the main div (fix a small empty div visible at the bottom of the page before timepicker is called) (Thanks Gertjan van Roekel)
Fixed a problem where the timepicker was never displayed with jquery ui 1.8.7 css,
the problem was the class ui-helper-hidden-accessible, witch I removed.
Thanks Alexander Fietz and StackOverflow : http://stackoverflow.com/questions/4522274/jquery-timepicker-and-jqueryui-1-8-7-conflict
Release 0.1.3 - April 12, 2011
Fixed a bug for when input Id had a dot in it, it was getting double escaped when it should not. (Thanks Zdenek Machac)

Release 0.0.4 - jan 10, 2011
changed showLeadingZero to affect only hours, added showMinutesLeadingZero for minutes display
Removed width:100% for tables in css
Release 0.1.2 - April 11, 2011
So in 0.1.1 I created a bug that made timepicker changes the location hash, well not i'ts fixed. (Thanks Lucas Falk)

Release 0.0.5 - Jan 18, 2011
Now updating time picker selected value when manually typing in the text field (thanks Rasmus Schultz)
Fixed : with showPeriod: true and showLeadingZero: true, PM hours did not show leading zeros (thanks Chandler May)
Fixed : with showPeriod: true and showLeadingZero: true, Selecting 12 AM shows as 00 AM in the input field, also parsing 12AM did not work correctly (thanks Rasmus Schultz)
Release 0.1.1 - April 6, 2011
Changed the cells click and dblclick binding for faster rendering in IE6/7 (Thanks Blair Parsons)
Fixed a class naming bug created in 0.1.0 (Thanks Morlion Peter)

Release 0.1.0 - March 23, 2011
Fixed some bugs with release 0.0.9

Release 0.0.9 - March 22, 2011
Added zIndex option (Thanks Frank Enderle)
Added option showPeriodLabels that defines if the AM/PM labels are displayed on the left (Thanks Frank Enderle)
Added showOn ['focus'|'button'|'both'] and button options for alternate trigger method

Release 0.0.8 - Fev 17, 2011
Fixed close event not triggered when switching to another input with time picker (thanks Stuart Gregg)

Release 0.0.7 - Fev 10, 2011
Added function to set time after initialisation :$('#timepicker').timepicker('setTime',newTime);
Added support for disabled period of time : onHourShow and onMinuteShow (thanks Rene Felgentr�ger)

Release 0.0.6 - Jan 19, 2011
Added standard "change" event being triggered on the input when the content changes. (Thanks Rasmus Schultz)
Expand All @@ -28,24 +35,21 @@ Added altField that receive the parsed time value when selected time changes
Added defaultTime value to use when input field is missing (inline) or input value is empty
if defaultTime is missing, current time is used

Release 0.0.7 - Fev 10, 2011
Added function to set time after initialisation :$('#timepicker').timepicker('setTime',newTime);
Added support for disabled period of time : onHourShow and onMinuteShow (thanks Rene Felgentr�ger)

Release 0.0.8 - Fev 17, 2011
Fixed close event not triggered when switching to another input with time picker (thanks Stuart Gregg)

Release 0.0.9 - March 22, 2011
Added zIndex option (Thanks Frank Enderle)
Added option showPeriodLabels that defines if the AM/PM labels are displayed on the left (Thanks Frank Enderle)
Added showOn ['focus'|'button'|'both'] and button options for alternate trigger method
Release 0.0.5 - Jan 18, 2011
Now updating time picker selected value when manually typing in the text field (thanks Rasmus Schultz)
Fixed : with showPeriod: true and showLeadingZero: true, PM hours did not show leading zeros (thanks Chandler May)
Fixed : with showPeriod: true and showLeadingZero: true, Selecting 12 AM shows as 00 AM in the input field, also parsing 12AM did not work correctly (thanks Rasmus Schultz)

Release 0.1.0 - March 23, 2011
Fixed some bugs with release 0.0.9
Release 0.0.4 - jan 10, 2011
changed showLeadingZero to affect only hours, added showMinutesLeadingZero for minutes display
Removed width:100% for tables in css

0.1.1 - April 6, 2011
Changed the cells click and dblclick binding for faster rendering in IE6/7 (Thanks Blair Parsons)
Fixed a class naming bug created in 0.1.0 (Thanks Morlion Peter)
Release 0.0.3 - Jan 8, 2011
Re-added a display:none on the main div (fix a small empty div visible at the bottom of the page before timepicker is called) (Thanks Gertjan van Roekel)
Fixed a problem where the timepicker was never displayed with jquery ui 1.8.7 css,
the problem was the class ui-helper-hidden-accessible, witch I removed.
Thanks Alexander Fietz and StackOverflow : http://stackoverflow.com/questions/4522274/jquery-timepicker-and-jqueryui-1-8-7-conflict

0.1.2 - April 11, 2011
So in 0.1.1 I created a bug that made timepicker changes the location hash, well not i'ts fixed. (Thanks Lucas Falk)
Release 0.0.2 - Jan 6, 2011
Updated to include common display options for USA users
Stephen Commisso - Jan 2011

0 comments on commit 8a97634

Please sign in to comment.