Hello Experts,
I have a entity form on which I have added the date only field, while selecting the date from that date picker on my entity form it is lagging behind by one day.
please see the attached screenshot.
and the record getting inserted for previous date, I am facing the similar issue when I am having the date only field in my some other entities as well.
Any help on this is really appreciable!!
Regards,
Pranesh
Hi, back in the CDS solution, make sure both Data Type and behavior of your date fields are set to Date-Only:
Power Pages Super User | MVP
Hi @praneshJ :
I guess your problem is caused by the time zone.
For example, if you save UCT time to CDS, and then use the datapicker control, its DateTimeZone property value is DateTimeZone.Local. The time it displays will be based on UCT time plus date offset (Time zone offset).
I have two solutions for your reference:
Soltuion 1:
Set the dropdown control's default property to
DateAdd(Parent.Default,-TimeZoneOffset(),Minutes)
Soltuion 2:
Set the dropdown control's DateTimeZone property to
DateTimeZone.Local
Best Regards,
Bof
Hi @praneshJ :
Has the problem been solved?
Is there anything else I can help?
If this post helps, then please consider Accept it as the solution to help others.Thanks
Best Regards,
Bof