View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
15310Bug reportsSurvey takingpublic2022-09-22 14:55
Reportercdorin Assigned To 
PrioritylowSeveritypartial_block 
Status ready for testingResolutionopen 
Product Version3.17.x 
Summary15310: Display dropdown boxes - Date/Time question type not working correctly if minimum date < 1900
Description

See title.

No year < 1900 can be selected even if the minimum date field is correctly set up.

Pre-condition: display dropdown attribute is enabled.

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)3.x
I will donate to the project if issue is resolvedNo
Browser
Database type & versionirrelevant
Server OS (if known)
Webserver software & version (if known)
PHP Versionirrelevant

Users monitoring this issue

User List There are no users monitoring this issue.

Activities

gabrieljenik

gabrieljenik

2022-08-01 21:47

manager   ~71284

Last edited: 2022-08-02 14:58

@ollehar @DenisChenu

https://github.com/LimeSurvey/LimeSurvey/blob/master/application/core/QuestionTypes/Date/RenderDate.php#L176

        if (!isset($yearmin) || $yearmin &lt; 1900 || $yearmin > 2187) {
            $yearmin = 1900;
        }

Any idea why years before 1900 or not allowed?
I mean, it is not default, but forbdding here.
Technical reason?

Why is this applying for dropdowns but not for date picker?

I think this is related to 09476.
Still, the bug may not be solved. If I select year 2012 and there is a 2 digit year, how should that be considered?

I just think sometime, the format of 2 digits for year shall not be used instead of restrtcing the years.

Thoughts?

gabrieljenik

gabrieljenik

2022-08-01 21:48

manager   ~71285

PS: This happens on master as well

gabrieljenik

gabrieljenik

2022-08-19 14:49

manager   ~71496

Chat with carsten:
Condition should be adjusted to allow lower and upper values.
Then lot of testing

gabrieljenik

gabrieljenik

2022-09-21 21:57

manager   ~71881

LTS: https://github.com/LimeSurvey/LimeSurvey/pull/2628

DenisChenu

DenisChenu

2022-09-22 09:20

developer   ~71883

It's not related to datepicker ?

Since we update it, maybe it work now ?

DenisChenu

DenisChenu

2022-09-22 09:35

developer   ~71885

Maybe need a test process here ?
What date must be tested ?

Can we have year between 0 and 100 ?
Can we have year before 0 ?

What is the date of murder of Julius Caesar
(year between -200 and 100 for example)

gabrieljenik

gabrieljenik

2022-09-22 14:46

manager   ~71894

It's not related to datepicker ?

Why would it be? This is when using dropdown

DenisChenu

DenisChenu

2022-09-22 14:54

developer   ~71895

Argl Sorry :)

Issue History

Date Modified Username Field Change
2019-09-19 15:41 cdorin New Issue
2019-11-14 21:53 cdorin Assigned To => cdorin
2019-11-14 21:53 cdorin Status new => assigned
2021-02-06 18:54 cdorin Assigned To cdorin =>
2021-02-06 18:54 cdorin Priority none => low
2021-02-06 18:54 cdorin Status assigned => confirmed
2021-02-06 18:54 cdorin Sync to Zoho Project => |Yes|
2022-07-27 23:15 gabrieljenik Assigned To => gabrieljenik
2022-07-27 23:15 gabrieljenik Status confirmed => assigned
2022-08-01 21:47 gabrieljenik Note Added: 71284
2022-08-01 21:47 gabrieljenik Bug heat 0 => 2
2022-08-01 21:48 gabrieljenik Note Added: 71285
2022-08-02 14:58 gabrieljenik Note Edited: 71284
2022-08-03 18:29 gabrieljenik Assigned To gabrieljenik => ollehar
2022-08-03 18:29 gabrieljenik Status assigned => feedback
2022-08-03 18:29 gabrieljenik Complete LimeSurvey version number (& build) irrelevant => 5.x
2022-08-19 14:49 gabrieljenik Note Added: 71496
2022-09-21 21:57 gabrieljenik Assigned To ollehar => DenisChenu
2022-09-21 21:57 gabrieljenik Status feedback => ready for code review
2022-09-21 21:57 gabrieljenik Complete LimeSurvey version number (& build) 5.x => 3.x
2022-09-21 21:57 gabrieljenik Note Added: 71881
2022-09-22 09:20 DenisChenu Note Added: 71883
2022-09-22 09:20 DenisChenu Bug heat 2 => 4
2022-09-22 09:35 DenisChenu Note Added: 71885
2022-09-22 14:46 gabrieljenik Note Added: 71894
2022-09-22 14:54 DenisChenu Note Added: 71895
2022-09-22 14:55 DenisChenu Assigned To DenisChenu =>
2022-09-22 14:55 DenisChenu Status ready for code review => ready for testing