Hello Team,
We are facing some issues with date manipulation, it inserts into DB with UTC format, but when retrieving the data in CRUD table shows in UTC date and while editing the data it shows invalid date, some time shows the wrong value, the menu was generated using RAD Tool.
Gone through the Timing documentation and tried with **ClockProviders **option and timezone settings in the administration settings menu, but no change, we need to save the data in UTC and display the data in local format. Attaching ADD/TABLE/EDIT views for the reference.
11 Answer(s)
-
0
Hi @mujthabagroad
Are you working on Angular or JQuery version ?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi,
Angular v6.8.0
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi,
Awaiting for the reply.
Thanks.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
-
0
Tried with that. but it displays in UTC, not converting to local time with local timezone. need to change overall application where it depends on it right?. how it can be fixed with MomentJS without changing the type?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi @mujthabagroad
Could it be related to https://github.com/aspnetzero/aspnet-zero-core/issues/2043 ?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Let me try this and get back you.
Thanks.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi, As per the discussion, need to change:
[(ngModel)]="entity.dateField "<span class="colour" style="color: rgb(36, 41, 46);"> to </span>[(ngModel)]="entity.dateField._d"<span class="colour" style="color: rgb(36, 41, 46);"> in datepicker input.</span> <span class="colour" style="color: rgb(36, 41, 46);">Also, initialize your date fields (</span>this.entity.dateField = moment();<span class="colour" style="color: rgb(36, 41, 46);">) in show method after </span>= new CreateOrEditEntityDto();so we should add this for all datepickers other than RAD generated views right. how it can be if it is a date and time picker?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Thanks @mujthabagroad
Are you using latest version of RAD Tool ? As I remember, we have already fixed this problem. It should be same for date-time pickers since date information also contains time.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Okay, we have generated it initially and may not be included at that time, we will change it accordingly.
Thanks
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Thanks @mujthabagroad
We will try to fix the problem with Rad Tool as well.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)
