-
-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementation of DateInput widget should render hardcoded "%Y-%m-%d" format #115
Comments
Hi Bojan, I think that's a valid concern and since a decission was already made in #27 I'm all in on only outputting the iso format for Just to confirm this that I'm on the same page: floppyforms already used to output only the ISO formats, but Django changed the semantics (the position of the ISO format) of If that's the case we should go for a fix on this. At best it would include some tests and even some documentation on this. But if that's too much to ask for it would even be already a big help if you could document down what changes you think are needed to resolve this ticket. |
Gregor,
Yes, django has changed position of ISO format, but before that change, some locales did not include an ISO format at all (https://code.djangoproject.com/ticket/19015). Also it is not guaranteed that ISO format would be on first (or last) position for given locale, so it should be better to hardcore iso format instead of relying on its position in I would prepare pull request for this so we can discuss this further. |
I agree, explicitly using the ISO format would be good here. |
FIX: jazzband#115 - Implementation of DateInput widget should render hardcoded "%Y-%m-%d" format
…hardcoded "%Y-%m-%d" format
FIX: jazzband#115 - Implementation of DateInput widget should render hardcoded "%Y-%m-%d" format
Gregor, sorry for delay, here is pull request. |
Fixed as with #124 |
FYI: I just released floppyforms 1.3 including your changes. |
Implementation of
DateInput
widget should render hardcoded "%Y-%m-%d" format.DateInput
andDateTimeInput
both uses first available format which is often not required "%Y-%m-%d" format.(https://github.com/gregmuellegger/django-floppyforms/blob/master/floppyforms/widgets.py#L279)
This renders date input as empty in browsers that support date html5 type, requiring user to enter date again:
That in chrome renders as "dd/mm/yyyy" instead of "10/07/2014", client validation will not allow form to submit if it is required field and would set field to None if it is not required field, thus loosing information.
I propose that
DateInput
widget always render value in rfc3339 format.Reference: #27
The text was updated successfully, but these errors were encountered: