View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
08787Bug reportsSurvey takingpublic2014-03-02 12:29
Reporterbkgray Assigned Tomfaber  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.05+ 
Fixed in Version2.05+ 
Summary08787: problems with date.js - DatePicker min/max limits do not consider timezone
Description

In file scripts/date.js, the values for minDate and maxDate Picker options are not calculated correctly for time zones other than GMT. For -0600, a minimum date string of "2014-02-17" creates a Date object with value 2014-02-16 18:00. The maxDate value is also off by 6 hours, so the allowable dates are shifted by 1 day (see attached image).

Also in date.js, in doPopusDate() there is a call to setPickerOptions without the required argument.

TagsNo tags attached.
Attached Files
DateTimePickerLimits.fw.png (96,711 bytes)   
DateTimePickerLimits.fw.png (96,711 bytes)   
date.js (9,614 bytes)
DateRangeTestCase.lss (14,001 bytes)
Bug heat8
Complete LimeSurvey version number (& build)2.05+ 140226
I will donate to the project if issue is resolvedNo
BrowserChrome
Database type & versionMySql 5.6.14
Server OS (if known)Win 2008 Server R2
Webserver software & version (if known)Apache 2.4.7
PHP Version5.5.6

Users monitoring this issue

bkgray

Activities

mfaber

mfaber

2014-03-01 01:12

reporter   ~29021

bkgray: I can see the problem in your screenshot but I was not able to replicate here.

I changed two lines in date.js, so the calculation of mindate and maxdate is not so much dependent on the implementation in browsers.

Could you replace your date.js with the version attached, clear your browser cache and see if this works for you?

c_schmitz

c_schmitz

2014-03-01 15:18

administrator   ~29025

bkgray, do you have set a time difference in global settings?

mfaber

mfaber

2014-03-01 17:12

reporter   ~29026

...and if it does not work, please also attach your test case (.lss file). Thanks, M

bkgray

bkgray

2014-03-01 21:14

reporter   ~29027

Last edited: 2014-03-01 21:15

c_schmitz: the time difference is set to 0. The server time and calculated time displayed are correct for my time zone.

mfaber: Thanks for the quick response - and the quick fix. Your modified version of date.js solves the problem for me.

Since you weren't able to reproduce the problem, I'll attach the .lss file anyway.

I'm seeing some odd behavior with time validation on the pop-up, but I haven't spent enough time with it yet. Could be code problems - but it could be my error, too.

mfaber

mfaber

2014-03-01 21:33

reporter   ~29028

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=13952

mfaber

mfaber

2014-03-01 21:35

reporter   ~29029

bkgray: thanks for the feedback. Patch is part of next release.

c_schmitz

c_schmitz

2014-03-02 12:29

administrator   ~29045

2.0+ Build 140302 released.

Related Changesets

LimeSurvey: master 84404d64

2014-03-01 20:31:12

mfaber


Committer: mfaber Details Diff
Fixed issue 08787: Timezone problem w/ minmax date in datepicker Affected Issues
08787
mod - scripts/date.js Diff File

Issue History

Date Modified Username Field Change
2014-02-28 21:16 bkgray New Issue
2014-02-28 21:16 bkgray File Added: DateTimePickerLimits.fw.png
2014-02-28 21:17 bkgray Issue Monitored: bkgray
2014-02-28 21:49 mfaber Assigned To => mfaber
2014-02-28 21:49 mfaber Status new => assigned
2014-03-01 01:12 mfaber Note Added: 29021
2014-03-01 01:12 mfaber File Added: date.js
2014-03-01 01:13 mfaber Status assigned => feedback
2014-03-01 15:18 c_schmitz Note Added: 29025
2014-03-01 17:12 mfaber Note Added: 29026
2014-03-01 21:14 bkgray Note Added: 29027
2014-03-01 21:14 bkgray Status feedback => assigned
2014-03-01 21:15 bkgray File Added: DateRangeTestCase.lss
2014-03-01 21:15 bkgray Note Edited: 29027
2014-03-01 21:33 mfaber Changeset attached => LimeSurvey master 84404d64
2014-03-01 21:33 mfaber Note Added: 29028
2014-03-01 21:33 mfaber Resolution open => fixed
2014-03-01 21:35 mfaber Note Added: 29029
2014-03-01 21:35 mfaber Reproducibility have not tried => unable to reproduce
2014-03-01 21:35 mfaber Status assigned => resolved
2014-03-01 21:35 mfaber Category Survey design => Survey taking
2014-03-01 21:35 mfaber Fixed in Version => 2.05+
2014-03-02 12:29 c_schmitz Note Added: 29045
2014-03-02 12:29 c_schmitz Status resolved => closed
2021-08-13 07:10 guest Bug heat 6 => 8