0

below are my script and a meta class in forms.py, i want to add date picker in my app but the date is not showing on the field.

enter image description here

 <script>
      $(function () {
        $("#datetimepicker").datetimepicker();
      });
    </script>

widgets = {
            # BIRTH DATE
            'birth': forms.DateInput(
                attrs={
                    'style':'font-size: 13px; cursor: pointer',
                    # 'type':'date',
                    # 'onkeydown': 'return false', # block typing inside input
                    'min': '1950-01-01',
                    'max': '2030-01-01',
                    'class': 'datetimepicker', # new
                    'placeholder': 'Birth date' # new
                }
            ),
1
  • the script is in my base.html file. Commented Dec 9, 2023 at 9:28

0

Browse other questions tagged or ask your own question.