Closed mapleflow closed 7 years ago
Grappelli not support
thanks for your replay.
it works when add list_editable field.
@mapleflow
the reason why having any field list_editable
makes the date pickers to suddently work is because grappelli will execute some javascript to initialize the date time pickers where there are forms.
You can create a custom template to make sure the date pickers are initialized in change lists
<project dir>/templates/admin/change_list.html
{% extends "admin/change_list.html" %}
{% load i18n %}
{% block javascripts %}
{{ block.super }}
{% url 'admin:jsi18n' as jsi18nurl %}
<script type="text/javascript" src="{{ jsi18nurl|default:'../../../jsi18n/' }}"></script>
<script type="text/javascript" charset="utf-8">
(function($) {
$(document).ready(function() {
grappelli.
initDateAndTimePicker();
});
})(grp.jQuery);
</script>
{% endblock %}
The html button missing class="ui-datepicker-trigger" when list_editable missing
the browser console no errors or warnings.
my env: python 3.4, django 1.10.5, theme Grappelli, is env cause error?