I am having trouble being able to get format or input_format to work
properly on a form TimeField/TimeInput and wanted to check to see if
anyone has ever come across this. I have a form built using ModelForm
which has a class_time field. I am trying to allow entries into the
timefield such as 4 p.m. or 10:30 a.m. rather than using the 24-hour
clock that is the default %H:%M:%S - which is all I have been able to
get working.
Below is the definition of the class_time field in my forms.py file:
class_time = forms.TimeField(widget=forms.TimeInput(format='%h:%i
%a'), error_messages={'required' : 'Please enter a time.', 'invalid' :
'Please enter a properly formatted.'})
Isn't that all I should need to do? Am I missing something? Is there
some work around? Has input_formats super-ceded the format
declaration? Doesn't seem to matter as I have gotten neither to work
as expected.
--
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.