Skip to content

Commit c158912

Browse files
committed
fixed AM / PM problem for arabic
Missed the regexp, now updated to match designator and not 'p', thought also that removing both ':' and '.' is ok.
1 parent 887b5b9 commit c158912

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

js/bootstrap-timepicker.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -756,12 +756,13 @@
756756
}
757757
}
758758
} else {
759-
if (time.match(/p/i) !== null) {
759+
if (time.match(new RegExp(this.pmDesignator, "i")) !== null) {
760760
meridian = this.pmDesignator;
761761
} else {
762762
meridian = this.amDesignator;
763763
}
764-
// Don't know how to include dynamically a char do both [.:]
764+
765+
// Remove both allowed separators [.:]
765766
time = time.replace(/[^0-9\:\.]/g, '');
766767
timeArray = time.split(this.timeSeparator);
767768

0 commit comments

Comments
 (0)