File tree Expand file tree Collapse file tree 2 files changed +12
-14
lines changed Expand file tree Collapse file tree 2 files changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -365,8 +365,10 @@ <h2>Formatting Your Time</h2>
365365					< p > The default format is "hh:mm tt", however ampm is turned off by default, so you will see "hh:mm"</ p > 
366366
367367					< dl  class ="defs "> 
368- 						< dt > h</ dt > < dd > Hour with no leading 0</ dd > 
369- 						< dt > hh</ dt > < dd > Hour with leading 0</ dd > 
368+ 						< dt > H</ dt > < dd > Hour with no leading 0 (24 hour)</ dd > 
369+ 						< dt > HH</ dt > < dd > Hour with leading 0 (24 hour)</ dd > 
370+ 						< dt > h</ dt > < dd > Hour with no leading 0 (12 hour)</ dd > 
371+ 						< dt > hh</ dt > < dd > Hour with leading 0 (12 hour)</ dd > 
370372						< dt > m</ dt > < dd > Minute with no leading 0</ dd > 
371373						< dt > mm</ dt > < dd > Minute with leading 0</ dd > 
372374						< dt > s</ dt > < dd > Second with no leading 0</ dd > 
@@ -507,8 +509,8 @@ <h3 id="basic_examples">Basic Initializations</h3>
507509< pre > 
508510$('#basic_example_3').datetimepicker({
509511	timeFormat: "h:m t",
510- 	pickerTimeFormat: "HH:mm",
511- 	ampm: true
512+ 	pickerTimeFormat: "HH:mm"// ,
513+ 	// ampm: true
512514});
513515</ pre > 
514516					</ div > 
Original file line number Diff line number Diff line change 11501150			hour  =  12 ; 
11511151		} 
11521152
1153- 		var  result ; 
11541153		if  ( hour  <  10 )  { 
1155- 			result  =  "0"  +  hour ; 
1156- 		} 
1157- 		else  { 
1158- 			result  =  String ( hour ) ; 
1154+ 			hour  =  "0"  +  hour ; 
11591155		} 
11601156
1161- 		return  result ; 
1157+ 		return  String ( hour ) ; 
11621158	} ; 
11631159
11641160	/* 
11811177		var  tmptime  =  format , 
11821178			ampmName  =  options . amNames [ 0 ] , 
11831179			hour  =  parseInt ( time . hour ,  10 ) ; 
1184- 		if  ( options . ampm )  { 
1185- 			if  ( hour  >  11 )  { 
1186- 				ampmName  =  options . pmNames [ 0 ] ; 
1187- 			} 
1180+ 			
1181+ 		if  ( hour  >  11 )  { 
1182+ 			ampmName  =  options . pmNames [ 0 ] ; 
11881183		} 
1184+ 
11891185		tmptime  =  tmptime . replace ( / (?: H H ? | h h ? | m m ? | s s ? | [ t T ] { 1 , 2 } | [ l z ] | ( ' .* ?' | " .* ?" ) ) / g,  function ( match )  { 
11901186		switch  ( match )  { 
11911187			case  'HH' :
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments