We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 386942c commit 1a04299Copy full SHA for 1a04299
src/TimeView.js
@@ -41,10 +41,9 @@ var DateTimePickerTime = React.createClass({
41
renderCounter: function( type ){
42
if (type !== 'daypart') {
43
var value = this.state[ type ];
44
- if (type === 'hours' && this.props.timeFormat.indexOf(' A') !== -1 && value > 12) {
45
- if (value > 12){
46
- value = value - 12;
47
- }
+ if (type === 'hours' && this.props.timeFormat.indexOf(' A') !== -1) {
+ value = (value - 1) % 12 + 1;
+
48
if (value === 0) {
49
value = 12;
50
}
0 commit comments