Skip to content

Commit 033696b

Browse files
Fix merge conflict
2 parents 23a7a88 + d57204c commit 033696b

36 files changed

+1955
-1798
lines changed

index.html

Lines changed: 51 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
<link rel="stylesheet" media="all" type="text/css" href="http://code.jquery.com/ui/1.8.23/themes/smoothness/jquery-ui.css" />
3939
<link rel="stylesheet" media="all" type="text/css" href="jquery-ui-timepicker-addon.css" />
4040

41-
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.0.min.js"></script>
42-
<script type="text/javascript" src="http://code.jquery.com/ui/1.8.23/jquery-ui.min.js"></script>
41+
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
42+
<script type="text/javascript" src="http://code.jquery.com/ui/1.8.24/jquery-ui.min.js"></script>
4343
<script type="text/javascript" src="jquery-ui-timepicker-addon.js"></script>
4444
<script type="text/javascript" src="jquery-ui-sliderAccess.js"></script>
4545
<script type="text/javascript">
@@ -106,6 +106,10 @@ <h3>Download</h3>
106106
.ui-timepicker-div dl dd { margin: 0 10px 10px 65px; }
107107
.ui-timepicker-div td { font-size: 90%; }
108108
.ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
109+
110+
.ui-timepicker-rtl{ direction: rtl; }
111+
.ui-timepicker-rtl dl { text-align: right; }
112+
.ui-timepicker-rtl dl dd { margin: 0 65px 10px 10px; }
109113
</pre>
110114

111115
<h3>Requirements</h3>
@@ -118,9 +122,11 @@ <h3>Requirements</h3>
118122

119123

120124
<h3>Version</h3>
121-
<p>Version 1.0.4</p>
125+
<p>Version 1.0.5</p>
126+
122127

123-
<p>Last updated on 09/29/2012</p>
128+
<p>Last updated on 10/06/2012</p>
129+
124130
<p>jQuery Timepicker Addon is currently available for use in all personal or commercial projects under both MIT and GPL licenses. This means that you can choose the license that best suits your project, and use it accordingly. </p>
125131
<p><a href="http://trentrichardson.com/Impromptu/GPL-LICENSE.txt" title="GPL License">GPL License</a></p>
126132
<p><a href="http://trentrichardson.com/Impromptu/MIT-LICENSE.txt" title="MIT License">MIT License</a></p>
@@ -178,6 +184,9 @@ <h3>Localization Options</h3>
178184

179185
<dt>timezoneText</dt>
180186
<dd><em>Default: "Timezone", A Localization Setting</em> - Label used to identify the timezone slider.</dd>
187+
188+
<dt>isRTL</dt>
189+
<dd><em>Default: false, A Localization Setting</em> - Right to Left support.</dd>
181190
</dl>
182191

183192
<h3>Alt Field Options</h3>
@@ -212,9 +221,12 @@ <h3>Timezone Options</h3>
212221
<dd><em>Default: [generated timezones]</em> - An array of timezones used to populate the timezone select. Can be an array of values or an array of objects: { label: "EST", value: "+0400" }</dd>
213222
</dl>
214223

215-
<h3>Time Field Settings</h3>
224+
<h3>Time Field Options</h3>
216225
<dl class="defs">
217226

227+
<dt>controlType</dt>
228+
<dd><em>Default: 'slider'</em> - Whether to use 'slider' or 'select'. If 'slider' is unavailable through jQueryUI, 'select' will be used. For advanced usage you may pass an object which implements "create", "options", "value" methods to use controls other than sliders or selects. See the _controls property in the source code for more details.</dd>
229+
218230
<dt>showHour</dt>
219231
<dd><em>Default: true</em> - Whether to show the hour slider.</dd>
220232

@@ -358,6 +370,7 @@ <h2>Formatting Your Time</h2>
358370
<dt>tt</dt><dd>am or pm for AM/PM</dd>
359371
<dt>TT</dt><dd>AM or PM for AM/PM</dd>
360372
<dt>z</dt><dd>Timezone as defined by timezoneList</dd>
373+
<dt>'...'</dt><dd>Literal text (Uses single quotes)</dd>
361374
</dl>
362375

363376
<p>Formats are used in the following ways:</p>
@@ -367,6 +380,8 @@ <h2>Formatting Your Time</h2>
367380
<li>$.datepicker.formatTime(format, timeObj, options) utility method</li>
368381
<li>$.datepicker.parseTime(format, timeStr, options) utility method</li>
369382
</ul>
383+
384+
<p>For help with formatting the date portion, visit the datepicker documentation for <a href="http://docs.jquery.com/UI/Datepicker/formatDate" title="jQuery UI Datepicker Formatting">formatting dates</a>.</p>
370385
</div>
371386

372387
<!-- ############################################################################# -->
@@ -427,7 +442,8 @@ <h2>Working with Localizations</h2>
427442
timeFormat: 'hh:mm tt',
428443
amNames: ['AM', 'A'],
429444
pmNames: ['PM', 'P'],
430-
ampm: false
445+
ampm: false,
446+
isRTL: false
431447
};
432448
$.timepicker.setDefaults($.timepicker.regional['ru']);
433449
</pre>
@@ -483,7 +499,7 @@ <h3 id="basic_examples">Basic Initializations</h3>
483499
</div>
484500
<pre>
485501
$('#basic_example_3').datetimepicker({
486-
timeFormat: "h:m",
502+
timeFormat: "h:m t",
487503
ampm: true
488504
});
489505
</pre>
@@ -593,6 +609,19 @@ <h3 id="slider_examples">Slider Modifications</h3>
593609
});</pre>
594610
</div>
595611

612+
<!-- ============= example -->
613+
<div class="example-container">
614+
<p>Use dropdowns instead of sliders. By default if slider is not available dropdowns will be used.</p>
615+
<div>
616+
<input type="text" name="slider_example_4" id="slider_example_4" value="" />
617+
</div>
618+
<pre>
619+
$('#slider_example_4').datetimepicker({
620+
controlType: 'select',
621+
ampm: true
622+
});</pre>
623+
</div>
624+
596625
<h3 id="alt_examples">Alternate Fields</h3>
597626

598627
<!-- ============= example -->
@@ -642,6 +671,21 @@ <h3 id="alt_examples">Alternate Fields</h3>
642671
</pre>
643672
</div>
644673

674+
<!-- ============= example -->
675+
<div class="example-container">
676+
<p>With inline mode using altField:</p>
677+
<div>
678+
<input type="text" name="alt_example_4_alt" id="alt_example_4_alt" value="" />
679+
<span id="alt_example_4" ></span>
680+
</div>
681+
<pre>
682+
$('#alt_example_4').datetimepicker({
683+
altField: "#alt_example_4_alt",
684+
altFieldTimeOnly: false
685+
});
686+
</pre>
687+
</div>
688+
645689
<h3 id="rest_examples">Time Restraints</h3>
646690

647691
<!-- ============= example -->

jquery-ui-sliderAccess.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,12 @@
3131
upText: '+',
3232
downText: '-',
3333
buttonset: true,
34-
buttonsetTag: 'span'
34+
buttonsetTag: 'span',
35+
isRTL: false
3536
}, options),
3637
$buttons = $('<'+ o.buttonsetTag +' class="ui-slider-access">'+
37-
'<button data-icon="'+ o.downIcon +'" data-step="-'+ o.step +'">'+ o.downText +'</button>'+
38-
'<button data-icon="'+ o.upIcon +'" data-step="'+ o.step +'">'+ o.upText +'</button>'+
38+
'<button data-icon="'+ o.downIcon +'" data-step="'+ (o.isRTL? o.step : o.step*-1) +'">'+ o.downText +'</button>'+
39+
'<button data-icon="'+ o.upIcon +'" data-step="'+ (o.isRTL? o.step*-1 : o.step) +'">'+ o.upText +'</button>'+
3940
'</'+ o.buttonsetTag +'>');
4041

4142
$buttons.children('button').each(function(j, jobj){
@@ -73,8 +74,8 @@
7374

7475
// adjust the width so we don't break the original layout
7576
var bOuterWidth = $buttons.css({
76-
marginLeft: (o.where == 'after'? 10:0),
77-
marginRight: (o.where == 'before'? 10:0)
77+
marginLeft: ((o.where == 'after' && !o.isRTL) || (o.where == 'before' && o.isRTL)? 10:0),
78+
marginRight: ((o.where == 'before' && !o.isRTL) || (o.where == 'after' && o.isRTL)? 10:0)
7879
}).outerWidth(true) + 5;
7980
var tOuterWidth = $t.outerWidth(true);
8081
$t.css('display','inline-block').width(tOuterWidth-bOuterWidth);

jquery-ui-timepicker-addon.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@
44
.ui-timepicker-div dl dd { margin: 0 10px 10px 65px; }
55
.ui-timepicker-div td { font-size: 90%; }
66
.ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
7+
8+
.ui-timepicker-rtl{ direction: rtl; }
9+
.ui-timepicker-rtl dl { text-align: right; }
10+
.ui-timepicker-rtl dl dd { margin: 0 65px 10px 10px; }

0 commit comments

Comments
 (0)