mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(datetime): datetime locale with h23 will respect max time range (#24610)
Resolves #24588
This commit is contained in:
@@ -219,7 +219,7 @@ export const generateTime = (
|
||||
if (maxParts.hour !== undefined) {
|
||||
processedHours = processedHours.filter(hour => {
|
||||
const convertedHour = refParts.ampm === 'pm' ? (hour + 12) % 24 : hour;
|
||||
return convertedHour <= maxParts.hour!;
|
||||
return (use24Hour ? hour : convertedHour) <= maxParts.hour!;
|
||||
});
|
||||
isPMAllowed = maxParts.hour >= 13;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user