@@ -423,16 +423,62 @@ <h2>Some Examples</h2>
423
423
});
424
424
</ pre >
425
425
</ div >
426
+
427
+
428
+ <!-- ============= example -->
429
+ < div class ="example-container ">
430
+ < p > Use the utility function to format your own time. $.datepicker.formatTime(format, time, options)</ p >
431
+ < dl >
432
+ < dt > timezoneList</ dt > < dd > An array of timezones, either with strings ['-0500','-0600',..] or objects [ { value: '-0500', label: 'EST'}, { value: '-0600', label: 'CST' },..]</ dd >
433
+ < dt > timezoneIso8601</ dt > < dd > Formats the timezones in the timezone list in 8601 format
434
+ </ dl >
435
+
436
+ < div >
437
+ < input type ="text " name ="example15a " id ="example15a " value ="" />
438
+ < input type ="text " name ="example15b " id ="example15b " value ="" />
439
+ < input type ="text " name ="example15c " id ="example15c " value ="" />
440
+ </ div >
426
441
442
+ < pre >
443
+ $('#example15a').datetimepicker({
444
+ timeFormat: 'hh:mm z',
445
+ showTimezone: true
446
+ });
447
+
448
+ $('#example15b').datetimepicker({
449
+ timeFormat: 'hh:mm z',
450
+ showTimezone: true,
451
+ timezoneList: [
452
+ { value: '-0500', label: 'Eastern'},
453
+ { value: '-0600', label: 'Central' },
454
+ { value: '-0700', label: 'Mountain' },
455
+ { value: '-0800', label: 'Pacific' }
456
+ ]
457
+ });
458
+
459
+ $('#example15c').datetimepicker({
460
+ timeFormat: 'hh:mm z',
461
+ showTimezone: true,
462
+ timezone: 'MT',
463
+ timezoneList: [
464
+ { value: 'ET', label: 'Eastern'},
465
+ { value: 'CT', label: 'Central' },
466
+ { value: 'MT', label: 'Mountain' },
467
+ { value: 'PT', label: 'Pacific' }
468
+ ]
469
+ });
470
+ </ pre >
471
+ </ div >
472
+
427
473
<!-- ============= example -->
428
474
< div class ="example-container ">
429
475
< p > Connect to the onSelect event (Use your browser's js console for this example).</ p >
430
476
< div >
431
- < input type ="text " name ="example15 " id ="example15 " value ="" />
477
+ < input type ="text " name ="example16 " id ="example15 " value ="" />
432
478
</ div >
433
479
434
480
< pre >
435
- $('#example15 ').datetimepicker({
481
+ $('#example16 ').datetimepicker({
436
482
showSecond: true,
437
483
showMillisec: true,
438
484
timeFormat: 'hh:mm:ss:l',
@@ -448,12 +494,12 @@ <h2>Some Examples</h2>
448
494
< div class ="example-container ">
449
495
< p > Create a datetime range with a start and end date.</ p >
450
496
< div >
451
- < input type ="text " name ="example16_start " id ="example16_start " value ="" /> < input type ="text " name ="example16_end " id ="example16_end " value ="" />
497
+ < input type ="text " name ="example17_start " id ="example17_start " value ="" /> < input type ="text " name ="example17_end " id ="example17_end " value ="" />
452
498
</ div >
453
499
454
500
< pre >
455
- var startDateTextBox = $('#example16_start ');
456
- var endDateTextBox = $('#example16_end ');
501
+ var startDateTextBox = $('#example17_start ');
502
+ var endDateTextBox = $('#example17_end ');
457
503
458
504
startDateTextBox.datetimepicker({
459
505
onClose: function(dateText, inst) {
@@ -494,11 +540,11 @@ <h2>Some Examples</h2>
494
540
< div class ="example-container ">
495
541
< p > Use the < a href ="http://trentrichardson.com/2011/11/11/jquery-ui-sliders-and-touch-accessibility/ " title ="jQueryUI Slider Accessibility Addon "> sliderAccess addon</ a > to allow timepicker sliders to work on touch devices.</ p >
496
542
< div >
497
- < div id ="example17 "> </ div >
543
+ < div id ="example18 "> </ div >
498
544
</ div >
499
545
500
546
< pre >
501
- $('#example17 ').datetimepicker({
547
+ $('#example18 ').datetimepicker({
502
548
addSliderAccess: true,
503
549
sliderAccessArgs: { touchonly: false }
504
550
});
@@ -516,15 +562,17 @@ <h2>Some Examples</h2>
516
562
</ dl >
517
563
518
564
< div >
519
- < div id ="example18 "> </ div >
565
+ < div id ="example19 "> </ div >
520
566
</ div >
521
567
522
568
< pre >
523
- $('#example18 ').text(
569
+ $('#example19 ').text(
524
570
$.datepicker.formatTime('hh:mm z', { hour: 14, minute: 36, timezone: '+2000' }, { ampm: false })
525
571
);
526
572
</ pre >
527
573
</ div >
574
+
575
+
528
576
529
577
< h2 > Version</ h2 >
530
578
< p > Version 1.0.2</ p >
0 commit comments