Date passed as DateImpl object since 8.6

asked 2019-12-06 08:43:22 +0800

JustinFrost gravatar image JustinFrost
145 1 6


We have created a lot of custom components for ZK which pass dates from the Java class to the widget on the client side.

I noticed a bug since upgrading from 8.0.5 to ZK 8.6.3 that sometimes these are come through as a DateImpl object instead of a Javascript date as they used to.

It looks like this DateImpl object was added in 8.6 - is there something I can do to prevent this ?

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-12-06 10:55:16 +0800

MDuchemin gravatar image MDuchemin
2480 1 6
ZK Team


ZK switched from JS date objects to moment.js to improve date and time handling in ZK 8.5 and onward. This library provides better reliability for time-based values, including automatically updated timezones, etc.

You can get the JS Date from the DateImpl with:


That should be a good start for a component update. Is there any workflow not covered by that conversion?

link publish delete flag offensive edit


Hi Mathew - no I don't believe so - I have already tested that code myself successfully. Thanks.

JustinFrost ( 2019-12-06 11:14:34 +0800 )edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2019-12-06 08:43:22 +0800

Seen: 15 times

Last updated: Dec 06 '19

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More