use new Datepicker
This commit is contained in:
parent
1cdc5fb4d2
commit
82ab5f4eae
|
@ -1,6 +1,6 @@
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.contrib.admin.widgets import AdminDateWidget
|
from django.contrib.admin.widgets import AdminDateWidget
|
||||||
from django.forms import ModelForm
|
from django.forms import ModelForm, DateInput
|
||||||
|
|
||||||
from .models import Employee
|
from .models import Employee
|
||||||
|
|
||||||
|
@ -8,5 +8,5 @@ class EmployeeForm(ModelForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Employee
|
model = Employee
|
||||||
fields = '__all__'
|
fields = '__all__'
|
||||||
widgets = {'firstdate_employment': AdminDateWidget(),
|
widgets = {'firstdate_employment': DateInput(attrs={'type': 'date'}),
|
||||||
'firstdate_presence': AdminDateWidget(),}
|
'firstdate_presence': DateInput(attrs={'type': 'date'}),}
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
|
|
||||||
{% load i18n %}
|
|
||||||
{% load static %}
|
{% load static %}
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript" src="/admin/jsi18n/"></script>
|
<script type="text/javascript" src="/admin/jsi18n/"></script>
|
||||||
<script type="text/javascript" src="{% static 'admin/js/core.js' %}"></script>
|
<script type="text/javascript" src="{% static 'admin/js/core.js' %}"></script>
|
||||||
<script type="text/javascript" src="{% static 'admin/js/vendor/jquery/jquery.js' %}"></script>
|
<script type="text/javascript" src="{% static 'admin/js/vendor/jquery/jquery.js' %}"></script>
|
||||||
|
@ -13,7 +10,9 @@
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'admin/css/base.css' %}" />
|
<link rel="stylesheet" type="text/css" href="{% static 'admin/css/base.css' %}" />
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'admin/css/widgets.css' %}" />
|
<link rel="stylesheet" type="text/css" href="{% static 'admin/css/widgets.css' %}" />
|
||||||
|
|
||||||
|
{% load i18n %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<center>
|
<center>
|
||||||
<style>
|
<style>
|
||||||
ul > li {
|
ul > li {
|
||||||
|
@ -40,5 +39,4 @@
|
||||||
</table>
|
</table>
|
||||||
<button type="submit" value="submit">Abschicken</button>
|
<button type="submit" value="submit">Abschicken</button>
|
||||||
</form>
|
</form>
|
||||||
</center>
|
</center>{% endblock %}
|
||||||
{% endblock %}
|
|
||||||
|
|
Loading…
Reference in New Issue