View Issue Details

IDProjectCategoryView StatusLast Update
12198Bug reports[All Projects] Survey takingpublic2017-05-22 17:40
ReporterjeloAssigned ToDenisChenu 
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version2.64.x 
Target VersionFixed in Version 
Summary12198: Date/Time question with timeformat A a for AM/PM is not seen or saved as a valid value
DescriptionDate/Time question with the format set to 'HH:MM A' and the responses are not being captured by LimeSurvey.
Even when a valid entry is made, the response is blank.
This presents a problem with a Mandatory question, because LImesurvey presents an error message even when a valid entry has been made.

Threadstarter is johnF
https://www.limesurvey.org/forum/development/108639-date-time-question-not-caollecting-responses

Issue is reproducible with demo.limesurvey.org.
Changing format from "HH:MM a" to "HH:MMa" didn't make any impact. Nothing saved.
The question type is showing 24 with HH eventhough PM/AM is added. Not sure if that should be changed too.
TagsNo tags attached.
Complete LimeSurvey version number (& build)2.64.Z
I will donate to the project if issue is resolvedNo
Browser
Database & DB-VersionDemo
Operating System (Server)Demo
Webserver software & versionDemo
PHP VersionDemo

Activities

jelo

jelo

2017-03-14 12:20

reporter  

dateformat_ampm391433.lss (12,732 bytes)
jelo

jelo

2017-03-14 12:20

reporter   ~43280

The requested example as a survey file.
DenisChenu

DenisChenu

2017-03-18 20:18

developer   ~43291

Strangely : javascript ( {self.NAOK} ) show a good value
DenisChenu

DenisChenu

2017-03-18 20:19

developer  

dateformat_ampm391433-withjs.lss (12,775 bytes)
DenisChenu

DenisChenu

2017-03-18 20:28

developer   ~43292

Last edited: 2017-03-18 20:32

View 2 revisions

Think it's a boostrap-datepicker issue (see screenshot) BUT : https://github.com/smalot/bootstrap-datetimepicker/issues/3 is closed.

16:00 pm is clearly an invalid date

It's our integration of datetimepicker : https://eonasdan.github.io/bootstrap-datetimepicker/ is OK (see first)



DenisChenu

DenisChenu

2017-03-19 18:31

developer   ~43293

https://github.com/LimeSurvey/LimeSurvey/pull/669
DenisChenu

DenisChenu

2017-03-19 18:34

developer   ~43294

Last edited: 2017-03-19 18:34

View 2 revisions

You know better momentjs than me. We have to restrict momentjs for php control of date

PHP control is done here : https://github.com/LimeSurvey/LimeSurvey/blob/master/application/helpers/expressions/em_manager_helper.php#L8704
And don't accept other momentjs part. And more : using only momentjs broke existing survey.

https://github.com/LimeSurvey/LimeSurvey/pull/669

user78869

2017-03-21 15:54

  ~43307

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

web_digital

2017-03-27 23:23

reporter   ~43351

Prior to the 170324 release I was using the datepicker successfully with the following settings:
format: dd-mm-yyyy
Minimum date: "-6 months"
Max date: "now"
After the upgrade I noticed the datepicker validation broke with these settings - selecting dates above the max worked unexpectedly, but odd things started happening with the selected month.
To fix the issue in 170324+, I removed the format setting.
You can reproduce these settings working with 170310
DenisChenu

DenisChenu

2017-03-28 09:18

developer   ~43352

https://bugs.limesurvey.org/plugin.php?page=Source/view&id=22508
DenisChenu

DenisChenu

2017-03-29 10:26

developer   ~43358

Refixed here : https://github.com/LimeSurvey/LimeSurvey/commit/8b5d809d566b3db9473445818d8b30938a699ea4
c_schmitz

c_schmitz

2017-05-22 17:40

administrator   ~43700

Release 2.65.1 Build 170522

Related Changesets

LimeSurvey: master 81e18b4f

2017-03-19 18:28:51

DenisChenu

Details Diff
Fixed issue 12198: Date/Time question timeformat A seems invalid
Dev: looking at help : d/m/y for date H:M for time, adding A a
Dev: js use momentjs : http://momentjs.com/docs/#/displaying/format/
Dev: but hard to use momentjs with php date
Dev: see http://locutus.io/php/datetime/date/ too
mod - application/helpers/surveytranslator_helper.php Diff File
mod - application/libraries/Date_Time_Converter.php Diff File

LimeSurvey: master fad15807

2017-03-21 15:54:09

user78869


Committer: GitHub Details Diff
Merge pull request #669 from Shnoulle/master_fix12198

Fixed issue 12198: Date/Time question timeformat A seems invalid
mod - application/helpers/surveytranslator_helper.php Diff File
mod - application/libraries/Date_Time_Converter.php Diff File

LimeSurvey: master 8b5d809d

2017-03-27 19:40:59

DenisChenu

Details Diff
Fixed issue : Unable to use month in date
mod - application/helpers/surveytranslator_helper.php Diff File

Issue History

Date Modified Username Field Change
2017-03-12 15:19 jelo New Issue
2017-03-14 12:20 jelo File Added: dateformat_ampm391433.lss
2017-03-14 12:20 jelo Note Added: 43280
2017-03-18 20:18 DenisChenu Note Added: 43291
2017-03-18 20:19 DenisChenu File Added: dateformat_ampm391433-withjs.lss
2017-03-18 20:28 DenisChenu File Added: Capture du 2017-03-18 20-26-12.png
2017-03-18 20:28 DenisChenu Note Added: 43292
2017-03-18 20:32 DenisChenu Note Edited: 43292 View Revisions
2017-03-19 18:31 DenisChenu Note Added: 43293
2017-03-19 18:34 DenisChenu Assigned To => markusfluer
2017-03-19 18:34 DenisChenu Status new => feedback
2017-03-19 18:34 DenisChenu Note Added: 43294
2017-03-19 18:34 DenisChenu Note Edited: 43294 View Revisions
2017-03-21 15:54 DenisChenu Changeset attached => LimeSurvey master 81e18b4f
2017-03-21 15:54 user78869 Changeset attached => LimeSurvey master fad15807
2017-03-21 15:54 user78869 Note Added: 43307
2017-03-21 15:54 user78869 Assigned To markusfluer => user78869
2017-03-21 15:54 user78869 Resolution open => fixed
2017-03-27 23:23 web_digital Note Added: 43351
2017-03-28 09:17 DenisChenu Changeset attached => LimeSurvey master 8b5d809d
2017-03-28 09:18 DenisChenu Changeset removed LimeSurvey master 8b5d809d =>
2017-03-28 09:18 DenisChenu Note Added: 43352
2017-03-29 10:25 DenisChenu Changeset attached => LimeSurvey master 8b5d809d
2017-03-29 10:26 DenisChenu Assigned To user78869 => DenisChenu
2017-03-29 10:26 DenisChenu Status feedback => resolved
2017-03-29 10:26 DenisChenu Note Added: 43358
2017-05-22 17:40 c_schmitz Note Added: 43700
2017-05-22 17:40 c_schmitz Status resolved => closed