Skip to main content

Provides date and date/time fields with restrictions for Django forms.

Project description

Add this package to your virtual environment. In your Django application’s forms.py, import the field(s) you want to use (currently only RestrictedDateField and RestrictedDateTimeField). These offer additional options:

  • future_allowed=False – inhibit the input of dates / times that are in the future

  • past_allowed=False – inhibit the input of dates / times that are in the past

  • min_value=X, max_value=X – inhibit the input of dates / times before / after X, where X can be a Python date / datetime value or a callable that returns such a value

Most browsers will display a date and / or time picker whose range is limited by these options.

Other than with Django’s native fields, dates (and times) should be formatted according to the locale settings of the browser (which normally is the right thing to do).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_restricted_fields-0.3.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

django_restricted_fields-0.3.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file django_restricted_fields-0.3.0.tar.gz.

File metadata

File hashes

Hashes for django_restricted_fields-0.3.0.tar.gz
Algorithm Hash digest
SHA256 7ec2541bd184e2f4dc6287f2d776513790e26e593487fde331fad3985b773639
MD5 467a819003e17113f21339f743579c7f
BLAKE2b-256 213814343ddb31efbc365a36ee5c9de9301349f25b0a1ee752f4d0183c939f05

See more details on using hashes here.

File details

Details for the file django_restricted_fields-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_restricted_fields-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 80b3e9017fc30e53a24c53e25643a78acec7d61eebc888c7d0c9092ae0dfb093
MD5 fa2e875d45c59ab632032651105bcec2
BLAKE2b-256 fde3c827ed1434188fec0f7d970bb5bdc12fabaf5df993e9e594e7fd289b1e6e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page