Skip to content

Commit

Permalink
Fix #576, time portion of datetime picker incorrect for 12am and 12pm.
Browse files Browse the repository at this point in the history
  • Loading branch information
c-eiser13 committed Jun 5, 2020
1 parent 2ee1c1d commit d2e7e54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/controls/dateTimePicker/DateTimePicker.tsx
Original file line number Diff line number Diff line change
@@ -125,7 +125,7 @@ export class DateTimePicker extends React.Component<IDateTimePickerProps, IDateT
}

if (this.props.timeConvention !== TimeConvention.Hours24) {
if (hoursSplit[1] && hoursSplit[1].toLowerCase().indexOf("pm") !== -1) {
if (hoursSplit[1] && hoursSplit[1].toLowerCase().indexOf("am") !== -1) {
hours += 12;
if (hours === 24) {
hours = 0;

0 comments on commit d2e7e54

Please sign in to comment.