In-line editing of DateTimeField updates year's part to current year
Model field:
publish_date = models.DateTimeField(_("Published from"), blank=True)
Template:
{% editable f.publish_date
%}{{f.publish_date|date:"SHORT_DATE_FORMAT"}}{%endeditable%}
On Admin, set the date to a previous year, says 2013. Using in-line
editing, when I edit the form shows Year's part on Select as the current
year, with options from 2014 to 2023 (without 2013 option). If saved, the
original value is lost.
I found that code in Django creates a range of years starting from
now().year:
https://github.com/django/django/blob/master/django/forms/extras/widgets.py#L64
Is this an issue from a Mezzanine perspective? How the best aproach to
solve this? We can modify Mezzanine to init SelectDateWidget with a list of
years including the instance year as an option?
Thanks,
Fernando Macedo
--
You received this message because you are subscribed to the Google Groups
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.