I think here millisecond or microseconds are not coming ,in django-admin it
is coming with microseconds

On Mon, Jul 13, 2020, 11:57 PM Kasper Laudrup <[email protected]> wrote:

> Hi Chander,
>
> On 13/07/2020 20.07, chander shekhar wrote:
> > #forms.py
> >
> > classeventform(forms.ModelForm):
> >
> > classMeta:
> >
> >          model = Event
> >
> >          fields = [, 'end_time',]
> >
> >          widgets = {
> >
> > 'start_time':  forms.DateTimeInput(attrs={'type': 'datetime-local'}),
> >
>
> Look at the format attribute of DateTimeInput:
>
> https://docs.djangoproject.com/en/3.0/ref/forms/widgets/#datetimeinput
>
> and make sure it matches what is being sent by your template. I would
> probably test it by just printing out the value of start_time when
> submitting the form and go from there.
>
> There might also be some thirdparty Django applications that can help
> you. Time is and time formats is a pain to work with.
>
> Kind regards,
>
> Kasper Laudrup
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/d907af69-2973-e383-497c-4af6a0e15277%40stacktrace.dk
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAAmOWVzAFX2ju4Nekn6dAec4iBOSOzw98gwxNTaPLog3ZTS%3Dxw%40mail.gmail.com.

Reply via email to