I have a concern regarding this.. A few times I have tried to integrate django-floppyforms which takes a similar approach to what the html5 widgets offer (input types are specified by default) and it often causes pain. The reason is that while browsers say they support html5 input types sometimes that support is lacking or very badly implemented. As an example, if you say <input type="date" value="2011-12-28"> the only officially supported date format is an RFC-3339 'full-date' format (YYYY-MM-DD) according to the spec:
http://dev.w3.org/html5/markup/input.date.html#input.date.attrs.value http://tools.ietf.org/html/rfc3339 This means that you cannot have any other format of date string in that form field. Now, this ticket 16630 doesn't change the date field specifically but it does change the number field. (Is there a similar ticket for changing the date field?) I've run into a similar problem with the type='number' that this ticket does change. The problem I ran into was that forms cannot easily use the THOUSANDS_SEPARATOR because it is not a valid number. It has to be a 'float' to be valid. This means technically you need to use the text widget for that. http://dev.w3.org/html5/markup/datatypes.html#common.data.float So by my thinking this patch (and by extension the thinking of browsers and the w3) is non-backwards compatible with the way that django formats numbers when USE_THOUSANDS_SEPARATOR is True or when localization is turned on. https://docs.djangoproject.com/en/dev/ref/settings/#use-thousand-separator Maybe there is something I'm missing here? I just want to flag this as a concern and make sure that developers know what they are getting into by enabling that. I would be for this being the default if it could be disabled. That way, I can use modernizr.js and turn only certain marked fields into type="number" or type="date". At the minimum, we would need to document that the default behavior is changing. -Paul On Dec 28, 1:35 am, Aymeric Augustin <[email protected]> wrote: > On 27 déc. 2011, at 17:15, Jonas H. wrote: > > > This patch has been around for while now. I just updated the patch so it > > applies cleanly against rev 17281. > > > So, can we get this patch into trunk or is something missing? > > Hi Jonas, > > The patch looks pretty good, but it needs documentation: > - in the widgets reference; > - in the release notes, under backwards-incompatible changes. > > Best regards, > > -- > Aymeric Augustin. -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.
