Permalink
Browse files

Timepicker: use proposed syntax

  • Loading branch information...
1 parent 26b70df commit 14a8967af9c1d44e1ad32c727b61e57a44828841 Zach Shepherd committed Oct 16, 2012
Showing with 4 additions and 4 deletions.
  1. +1 −1 tests/unit/timepicker/timepicker.html
  2. +3 −3 ui/jquery.ui.timepicker.js
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css">
- <script src="../../../jquery-1.7.2.js"></script>
+ <script src="../../jquery-1.7.2.js"></script>
<script src="../../../external/globalize.js"></script>
<script src="../../../ui/jquery.ui.core.js"></script>
<script src="../../../ui/jquery.ui.widget.js"></script>
@@ -174,8 +174,8 @@ $.widget( "ui.timepicker", {
// minimal calendar object for timepicker
return {
patterns: {
- t: "h:mm tt",
- T: "h:mm:ss tt"
+ t: "<h>:<mm> <tt>",
+ T: "<h>:<mm>:<ss> <tt>"
},
AM: [ "AM", "am" ],
PM: [ "PM", "pm" ]
@@ -188,7 +188,7 @@ $.widget( "ui.timepicker", {
mask = mask.replace( formatNonPaddedHours, "_$1" );
if ( !this.options.ampm ) {
- mask = mask.replace( format12Hour, "H" ).replace( " tt", "" );
+ mask = mask.replace( format12Hour, "H" ).replace( / <?tt>?/, "" );
}
return mask;

0 comments on commit 14a8967

Please sign in to comment.