Created
January 18, 2020 21:11
-
-
Save yoandresaav/4949b462f55f9ebcb1e3e96cbf1d1d5f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib.admin.widgets import AdminDateWidget | |
class YourForm(forms.ModelForm): | |
from_date = forms.DateField(widget=AdminDateWidget()) | |
add | |
{{ form.media }} | |
from django.contrib.admin.widgets import AdminDateWidget | |
from django.contrib.postgres.forms.ranges import DateRangeField, | |
RangeWidget | |
class YourForm(forms.ModelForm): | |
date_range = DateRangeField(widget=RangeWidget(AdminDateWidget())) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment