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 ce19b43 commit 43dc35aCopy full SHA for 43dc35a
src/components/DateField/utils.ts
@@ -242,7 +242,7 @@ export function getDurationUnitFromSectionType(type: DateFieldSectionType) {
242
export function addSegment(section: DateFieldSection, date: DateTime, amount: number) {
243
let val = section.value ?? 0;
244
if (section.type === 'dayPeriod') {
245
- val = date.hour() + (date.hour() > 12 ? -12 : 12);
+ val = date.hour() + (date.hour() >= 12 ? -12 : 12);
246
} else {
247
val = val + amount;
248
const min = section.minValue;
0 commit comments