There’s a problem with the DateTimePicker when selecting the date from the drop down calendar. The date that is selected is always one day behind. For example if you select April 1 the date put into the calendar text box will be March 31.
This behavior is not exhibited when run from the development environment.. only when we post to our website! Hopefully you will be able to reproduce.
We have narrowed down the version range when the bug first appears. Version 1.3.6 is working correctly but 1.3.8 (and up) is NOT working!
See the sample video attached.
the fix for issue WJ-8208 is included in the latest Wisej development build (1.3.60).
Thanks for the update!
To keep you updated, the issue is that the server (any server running any web framework) can only have 1 time zone. Windows and .NET only allow for one system-wide time zone. It’s different from the localization information which can be changed for each thread. Therefore, Wisej can sync the locale of the thread responding to a request with the client, but it’s impossible to sync the time zone.
The fix for the DateTmie widget is to convert the date to the client’s time zone before formatting, which is simple since we have the client’s time zone offset in Application.Browser.TimezoneOffset.
However, we can’t override the DateTime.ToString() so developers have to be aware that the timezone on the server may not match the timezone of the client when formatting a DateTime to a string. DateTime structures in .NET do not carry the time zone information, therefore date operations are not affected. Only formatting is.
We have added a number of extension methods to DateTime that will help, instead of ToString() now in Wisej you can use Format: myDate.Format() and it will always format using the client’s time zone. We have have myDate.ToClientTime() and Application.ToClientTime(DateTime).
Will be in the next update.
Looks like a time zone problem when parsing the date/time received from the client. Logged as WJ-8208.
Please login first to submit.