-
Notifications
You must be signed in to change notification settings - Fork 125
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
Does it work within the admin? #73
Comments
Here is what I did for a quick work around, You can even use some options for each field (I wanted meridian and AM PM display for the time field):
|
how did you get that non-bootstrap theme on top? |
Hi, I have encountered the same problem, here is the code I use now in my admin forms to avoid the "Enter a list of values" error :
|
While using DateTimeInput (default for admin) it actually splits the date and time fields as id_fieldName_0 as date field and id_fieldName_1 as time field. When this DateTimeWidget is used, the post data contains only fieldName as single value, when django expects list of values. Hence in django admin, DateTimeWidget will always throw ValidationError to send values as list. (Tested in Django 1.8 with l10n false in settings) |
I have this fixed for admin, I'll push the update in a second |
What i've been doing it is applying trough raw javascript overriding the change_form.html from the admin with:
|
Should this be closed? |
Hello and thank you for your awesome widget,
I am trying to use your widget in the admin for this i am trying via a form in the following way:
this produce the following output:
at client side it all works great but once i try to save:
i believe this is because normally in the admin datetime field is repsented by two inputs one for time and one for date is there and easy workaround for this?
The text was updated successfully, but these errors were encountered: