diff --git a/datetimewidget/static/js/django-datetime-widget.js b/datetimewidget/static/js/django-datetime-widget.js new file mode 100644 index 0000000..afa61be --- /dev/null +++ b/datetimewidget/static/js/django-datetime-widget.js @@ -0,0 +1,6 @@ +$(document).ready(function() { + $("div.ddw-requirable-readonly>input").on('keydown paste', function (e) { + e.preventDefault(); + }); +}); + diff --git a/datetimewidget/widgets.py b/datetimewidget/widgets.py index b159c31..57aca3b 100644 --- a/datetimewidget/widgets.py +++ b/datetimewidget/widgets.py @@ -100,7 +100,7 @@ def get_supported_language(language_country_code): BOOTSTRAP_INPUT_TEMPLATE = { 2: """ -