From eae0e00d1f1274e267ca5c411a57101af4ccfa82 Mon Sep 17 00:00:00 2001 From: Herculino Trotta Date: Mon, 20 Jan 2025 21:48:09 -0300 Subject: [PATCH] fix(datepicker): missing leading zeros on times --- app/apps/common/utils/django.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/apps/common/utils/django.py b/app/apps/common/utils/django.py index b8f2faf..02800f5 100644 --- a/app/apps/common/utils/django.py +++ b/app/apps/common/utils/django.py @@ -76,12 +76,12 @@ def django_to_airdatepicker_datetime(django_format): def django_to_airdatepicker_datetime_separated(django_format): format_map = { # Time formats - "h": "h", # Hour (12-hour) - "H": "H", # Hour (24-hour) - "i": "m", # Minutes + "h": "hH", # Hour (12-hour) + "H": "HH", # Hour (24-hour) + "i": "mm", # Minutes "A": "AA", # AM/PM uppercase "a": "aa", # am/pm lowercase - "P": "h:mm AA", # Localized time format + "P": "h:mm aa", # Localized time format # Date formats "D": "E", # Short weekday name "l": "EEEE", # Full weekday name