ngx-bootstrap icon indicating copy to clipboard operation
ngx-bootstrap copied to clipboard

Set the default time when picking up a date.

Open maxcl10 opened this issue 1 year ago • 2 comments

I currently have a issue with the datePicker. When I select a date, the current time is automatically set. This is causing some issues on my side because I don't expect to have any time when I select a date. Is there a way to have 00:00:00z as default time?

maxcl10 avatar Apr 19 '23 13:04 maxcl10

This has caused a problem with an application where the Birth Date was shifted to the next day. The time being posted caused UTC to post to the server as the next day.

I fixed this by setting the time to midnight according to the browser's time zone. Setting it to UTC could cause problems depending on the UTC offset, where midnight of the current timezone should pass the UTC offset correctly. The DB is only saving the Date, not the time.

chrisstraw avatar May 03 '23 13:05 chrisstraw

We'll consider on adding outputFormat feature.

lexasq avatar Jul 12 '24 10:07 lexasq