WebAppBuilder Query Widget Date Bug

2173
5
05-06-2016 05:48 AM
ScottStopyak
Occasional Contributor II

It appears that the webappbuilder query widget has a showstopping bug when querying dates. I've formatted the date several ways now. Any which way I do it,  the query widget returns results for the wrong date. When the query expression is setup, it gives it a default date of today. You can't clear it. The results from running the query are always from the wrong day. One option I explored was picking the "unique" date from a dropdown but that isn't a viable option. For one it's cumbersome and secondly the dropdown isn't sorted correctly when you  use the most common date formats like dd/mm/yyyy. Has anyone ever found a way to trick this widget into working properly with dates?

0 Kudos
5 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Scott,

  I do not have a problem using the query widget with dates. Can you be more specific?

0 Kudos
ScottStopyak
Occasional Contributor II

It returns a date for the previous day instead of the day specified. I don’t know that its always the previous day. It may be whatever the day is when the expression is originally setup. I should also mention that our date fields will sometimes have hours minutes and seconds populated. Specifically, we have date/time for a scheduled inspection. Whatever date is selected from the calendar in the widget the results are returned incorrectly. I’ve tried to format it as a string instead of a date but that won’t work either.

RobertScheitlin__GISP
MVP Esteemed Contributor

Scott,

  The date being a day off it a pretty common issue for ArcGIS Server (not specific to WAB)

See this thread:

Web App Builder Date Issue

ArcGIS JavaScript Hack: Fixing Dates from ArcGIS Server

ScottStopyak
Occasional Contributor II

Thanks for shedding some light on this issue. So if I upgrade to 10.4 (giving me the ability to set a time zone) can I expect to resolve the issue or would it still require javascript date object hacks?

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Scott,

10.4 will fix it.