Re: DateTime widget in default CreateView form

2021-10-08 Thread Anil Felipe Duggirala
On Fri, Oct 8, 2021, at 10:57 AM, Iyanuoluwa Loko wrote: > The date-time has to accept a date, and if you input the date in the > textbox in the accepted django format, it will work fine. To have the > calendar icon, it is a widget, and you ycan call it by editing the HTML > input type, or addin

Re: DateTime widget in default CreateView form

2021-10-08 Thread Iyanuoluwa Loko
The choice is not a widget per se. The date-time in the model will accept a date time input, however, the calendar icon is a widget, and doesn't come automatically. The date-time has to accept a date, and if you input the date in the textbox in the accepted django format, it will work fine. To have

Re: DateTime widget in default CreateView form

2021-10-08 Thread Anil Felipe Duggirala
On Fri, Oct 8, 2021, at 8:41 AM, MR INDIA wrote: > Answer to this query on stack overflow > > Raw link: > https://stackoverflow.com/questions/27321692/override-a-django-generic-class-based-view-widget

Re: DateTime widget in default CreateView form

2021-10-08 Thread MR INDIA
Answer to this query on stack overflow Raw link: https://stackoverflow.com/questions/27321692/override-a-django-generic-class-based-view-widget Hope this helps, A fellow django developer On Friday,

Re: DateTime widget in default CreateView form

2021-10-07 Thread Anil Felipe Duggirala
On Thu, Oct 7, 2021, at 5:50 PM, sum abiut wrote: > You can use modelform. > > in your form.py you can do something like this > > # setup date picker start > class DateInput(forms.DateInput): > input_type = 'date' > > class Formname(forms.ModelForm): > class Meta: >

Re: DateTime widget in default CreateView form

2021-10-07 Thread sum abiut
You can use modelform. in your form.py you can do something like this # setup date picker start class DateInput(forms.DateInput): input_type = 'date' class Formname(forms.ModelForm): class Meta: model= yourmodel fields = ('datefield

DateTime widget in default CreateView form

2021-10-07 Thread Anil Felipe Duggirala
hello, I have tried to find an answer to this question online, with no clear response. I have created a simple class based CreateView for a model that has a DateTime attribute. Simply rendering the form using the {{ form.as_p }} tag in the template associated to the aforementioned view does not g