cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Datepicker without time causes previous day to be submitted to the script

nadams1
3-Visitor

Datepicker without time causes previous day to be submitted to the script

The issue I believe is due to the browser time zone being BST. The browser is returning the UTC datetime for the selected date with 00:00:00 for the time element. this causes it to move back an hour to the previous day.

Is there anyway to specify the time used witout it displaying? for instance if I set the time to 13:00:00 then the correct day would always be returned and all I need to do it normalise(set the start time to 00:00:00 and end time to 23:59;59) my times to use it in a query.

or is there a way to get the date that the user selected regardless of the timezone in use?

1 REPLY 1

One way to achieve it would be to configure your Date-Time-Picker to be 'DateOnly'. Bind your start and end dates in the query using expressions to add the time portion as per the needs.

OR

if you want to query data for a particular date ignoring the time portion, no expression may be needed. For e.g. for all data from 2016-July-18 you can use DateOnly and pick the following dates:

     Start Date - 2016-July-18 00:00:00 & End Date - 2016-July-19 00:00:00

Top Tags