mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-04-25 10:08:36 +02:00
Merge pull request #53 from eitchtee/50-date-notation
fix(datepicker): missing leading zeros on times
This commit is contained in:
@@ -76,12 +76,12 @@ def django_to_airdatepicker_datetime(django_format):
|
|||||||
def django_to_airdatepicker_datetime_separated(django_format):
|
def django_to_airdatepicker_datetime_separated(django_format):
|
||||||
format_map = {
|
format_map = {
|
||||||
# Time formats
|
# Time formats
|
||||||
"h": "h", # Hour (12-hour)
|
"h": "hH", # Hour (12-hour)
|
||||||
"H": "H", # Hour (24-hour)
|
"H": "HH", # Hour (24-hour)
|
||||||
"i": "m", # Minutes
|
"i": "mm", # Minutes
|
||||||
"A": "AA", # AM/PM uppercase
|
"A": "AA", # AM/PM uppercase
|
||||||
"a": "aa", # am/pm lowercase
|
"a": "aa", # am/pm lowercase
|
||||||
"P": "h:mm AA", # Localized time format
|
"P": "h:mm aa", # Localized time format
|
||||||
# Date formats
|
# Date formats
|
||||||
"D": "E", # Short weekday name
|
"D": "E", # Short weekday name
|
||||||
"l": "EEEE", # Full weekday name
|
"l": "EEEE", # Full weekday name
|
||||||
|
|||||||
Reference in New Issue
Block a user