View Issue Details

This bug affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
08955Feature requestsSurvey takingpublic2014-05-03 21:32
Reporterronny_todgers Assigned Tomfaber  
PrioritynormalSeverityfeature 
Status closedResolutionfixed 
Summary08955: JQuery Datepicker YearRange is not set leading to an irritating default of 10 years
Description

The Date picker does not have the year range set even in the cases where the Min and Max years are defined.
In 2.05 the default is 10 years and this is highly annoying where a larger range is required - furthermore the GUI options available of min and max year do not have any effect on this default range unless the gap between them is less than 10 years.

As a fix I have modified the date.js file to set the yearrange to be from the min to the max such that the drop down will always allow the selection of any valid year - this seems to be the behaviour prior to version 2.05 so rather than a feature request I think this is a fix for a regression :)

Additional Information

function setPickerOptions(input)
{
...

return {
    // set minimum and maximum date
    // remove the time component for Firefox
    minDate: Date.parseString(datemin.substr(0,10), "yyyy-mm-dd"),
    maxDate: Date.parseString(datemax.substr(0,10), "yyyy-mm-dd"),
    yearRange: datemin.substr(0,4)+':'+datemax.substr(0,4),
    //set the other options so datetimepicker is either a datepicker or a timepicker or both
    showTimepicker: bshowTimepicker,
    timeOnly: btimeOnly,
    showButtonPanel: bshowButtonPanel,
    alwaysSetTime: balwaysSetTime,
    onSelect: sonSelect,
    dateFormat: sdateFormat,
    timeFormat: stimeFormat,
    onClose: sonClose

};

TagsNo tags attached.
Bug heat2
Story point estimate
Users affected %

Users monitoring this issue

There are no users monitoring this issue.

Activities

mfaber

mfaber

2014-04-10 22:54

reporter   ~29707

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

mfaber

mfaber

2014-04-10 22:56

reporter   ~29708

Thanks to ronny_todgers!

mfaber

mfaber

2014-04-10 22:58

reporter   ~29709

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

Related Changesets

LimeSurvey: master 49d068cf

2014-04-10 20:53:58

mfaber


Committer: mfaber Details Diff
Fixed issue 08955: YearRange for date picker not set

Dev: default to annoying 10 years if not set.
Affected Issues
08955
mod - scripts/date.js Diff File

LimeSurvey: 2.06 6f47e1cf

2014-04-10 20:53:58

mfaber


Committer: mfaber Details Diff
Fixed issue 08955: YearRange for date picker not set

Dev: default to annoying 10 years if not set.
Affected Issues
08955
mod - scripts/date.js Diff File

Issue History

Date Modified Username Field Change
2014-04-10 18:26 ronny_todgers New Issue
2014-04-10 22:54 mfaber Changeset attached => LimeSurvey master 49d068cf
2014-04-10 22:54 mfaber Note Added: 29707
2014-04-10 22:54 mfaber Assigned To => mfaber
2014-04-10 22:54 mfaber Resolution open => fixed
2014-04-10 22:55 mfaber Status new => assigned
2014-04-10 22:56 mfaber Product Version => 2.05+
2014-04-10 22:56 mfaber Fixed in Version => 2.05+
2014-04-10 22:56 mfaber Target Version => 2.05+
2014-04-10 22:56 mfaber Note Added: 29708
2014-04-10 22:58 mfaber Changeset attached => LimeSurvey 2.06 6f47e1cf
2014-04-10 22:58 mfaber Note Added: 29709
2014-04-10 22:59 mfaber Status assigned => resolved
2014-05-03 21:32 c_schmitz Status resolved => closed