class HumanUser(AbstractUser):
birth_date = models.DateField(null=True, blank=True, verbose_name=u"DOB")
class profile_form(forms.ModelForm):
def __init__(self, *args, **kwargs):
kwargs.setdefault('label_suffix', '')
super(profile_form, self).__init__(*args, **kwargs)
for field in self.fields:
self.fields[field].widget.attrs.update({'class': 'form-control form-control-line', })
class Meta:
model = User
fields = [
'full_name',
'birth_date',
'mobile',
'bio',
'gender',
]
<input type="text" name="birth_date" class="form-control form-control-line" id="id_birth_date" />
On Jan 22, 2018, at 10:33 AM, Ruchit Bhatt <ruchitinn...@gmail.com> wrote:forms.ModelForm
Is there any bootstrap hack to fix this ??
<input type="text" name="birth_date" id="example-date-input" class="form-control form-control-line" type="date" />
forms.DateInput.input_type="date"
forms.DateTimeInput.input_type="datetime-local"