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