View Issue Details

IDProjectCategoryView StatusLast Update
13322Bug reports[All Projects] Otherpublic2018-03-06 11:15
ReporterJamesHarrisHKIAssigned Tomarkusfluer 
PriorityhighSeverityminor 
Status closedResolutionfixed 
Product Version3.1.x 
Target VersionFixed in Version3.4.x 
Summary13322: DateTime picker opens partially or not at all
DescriptionTo create a minimal, complete, verifiable example for this, I created a survey with two identical Date/Time questions. Both are set to use the format "dd/mm/yyyy HH:MM", so clicking the calendar button by each field should open a date-and-time picker.

When the survey is set to use certain themes, such as "fruity", clicking the second calendar button opens a date-and-time picker as expected, but clicking the first one only opens the date picker. Both questions use the exact same settings; they should have the same behavior.

When the survey uses other themes, such as "bootswatch" or "vanilla", no pickers will open at all. The browser's console shows this error: "uncaught exception: bootstrap-datetimepicker requires Moment.js to be loaded first", followed by "TypeError: jQuery(...).datetimepicker is not a function". Curiously, one of our people extended the "bootswatch" theme and got the partially-working behavior from the "fruity" theme, despite the extended theme only making a few color changes in CSS.

Here's my example, set to use "fruity": http://uksurveys.hkipop.com/index.php/114454?newtest=Y&lang=en We are using the most recent code from the master branch, commit cd7ead6.

Vanilla: No popups
Bootswatch: No popups
Fruity: 1.5 popups
Steps To Reproduce1. Create a new survey.
2. Create a question group.
3. Create a new question. Under "Question Type" on the right, select "Mask questions -> Date/Time (type code: D)". Under "Input -> Date/Time Format", type "dd/mm/yyyy HH:MM".
4. Repeat step 3.
5. Preview survey. Click "Next".
6. Click the calendar button next to the first question. You get a calendar-style date picker.
7. Click the calendar button next to the second question. You get a calendar-style date picker and also a time selector.
8. Back in the admin panel for your test, go to Settings -> General Settings -> Template and change it from "fruity" to "bootswatch" or "vanilla". Click "Save".
9. Repeat step 5.
10. Click either of the calendar buttons. Nothing happens.
TagsNo tags attached.
Complete LimeSurvey version number (& build)cd7ead6
I will donate to the project if issue is resolvedNo
BrowserFirefox and Chrome
Database & DB-Version347
Operating System (Server)Windows Server 2008
Webserver software & versionApache/2.4.23 (Win64)
PHP Version7.0.9

Activities

c_schmitz

c_schmitz

2018-02-09 17:25

administrator   ~46374

Is this still an issue in the latest release version?
If yes, please attach the sample survey. Thank you.
JamesHarrisHKI

JamesHarrisHKI

2018-02-09 17:33

reporter   ~46376

Yes. Here is the sample survey: http://uksurveys.hkipop.com/index.php/114454?newtest=Y&lang=en
JamesHarrisHKI

JamesHarrisHKI

2018-02-09 17:35

reporter   ~46377

I have exported the survey as an .lsa file, attached. Is that what you need?

survey_archive_114454.lsa (3,886 bytes)
JamesHarrisHKI

JamesHarrisHKI

2018-02-12 21:47

reporter   ~46404

We've switched to limesurvey3.3.0+180209 and the bug still appears.
JamesHarrisHKI

JamesHarrisHKI

2018-02-21 17:53

reporter   ~46710

This bug report is for DateTime pickers, but we're seeing a related issue with Date pickers. Sometimes (but not always) the console will say "uncaught exception: bootstrap-datetimepicker requires Moment.js to be loaded first" and the Date picker will fail to open when clicked. Perhaps there's a race condition happening?
olle

olle

2018-03-01 16:28

administrator   ~46853

I tried to reproduce this on Linux without success. The date picker works fine. The picker works fine in your link, too. Can this issue be closed?
LouisGac

LouisGac

2018-03-05 10:23

developer   ~46890

Markus could you have a look to the moment.js loading problem?
markusfluer

markusfluer

2018-03-05 10:48

developer   ~46891

To use the datetimepicker moment has to be loaded as a package in the theme.
LouisGac

LouisGac

2018-03-05 11:05

developer   ~46892

Reporter say: " Sometimes (but not always) the console will say "uncaught exception: bootstrap-datetimepicker requires Moment.js to be loaded first" and the Date picker will fail to open when clicked. "

could you check how the date picker's js and moment js are loaded?
JamesHarrisHKI

JamesHarrisHKI

2018-03-05 17:59

reporter   ~46904

After upgrading to LimeSurvey 3.4.3+180227, the moment.js loading problem no longer appears. On all themes, DatePickers and DateTimePickers will no longer fail to open. Thank you for the fix. :-)

We still have the issue that when placing two identical DateTimePickers in a survey, the first one will consistently produce a DatePicker instead. See attached screenshots, created from the same sample survey I linked above: http://uksurveys.hkipop.com/index.php/114454?newtest=Y&lang=en

DateTime-2.png (57,894 bytes)
DateTime-2.png (57,894 bytes)
DateTime-1.png (59,837 bytes)
DateTime-1.png (59,837 bytes)
LouisGac

LouisGac

2018-03-05 18:04

developer   ~46905

ok thank you for that feedback!
could you please open a new bug report for the double date time picker problem?
JamesHarrisHKI

JamesHarrisHKI

2018-03-05 18:06

reporter   ~46906

I have just noticed that DateTimePicker 1 has a small clock icon at the bottom that, when clicked, reveals the "time" side of the DateTimePicker. This is not clear enough, and it is not consistent. Please label the icon and/or cause the two identical DateTimePickers to function the same way.
JamesHarrisHKI

JamesHarrisHKI

2018-03-05 18:51

reporter   ~46911

@LouisGac New bug report, as requested: https://bugs.limesurvey.org/view.php?id=13450
JamesHarrisHKI

JamesHarrisHKI

2018-03-05 18:51

reporter   ~46912

You can close this issue now.

Issue History

Date Modified Username Field Change
2018-02-08 19:52 JamesHarrisHKI New Issue
2018-02-09 17:25 c_schmitz Assigned To => c_schmitz
2018-02-09 17:25 c_schmitz Status new => feedback
2018-02-09 17:25 c_schmitz Note Added: 46374
2018-02-09 17:33 JamesHarrisHKI Note Added: 46376
2018-02-09 17:33 JamesHarrisHKI Status feedback => assigned
2018-02-09 17:35 JamesHarrisHKI File Added: survey_archive_114454.lsa
2018-02-09 17:35 JamesHarrisHKI Note Added: 46377
2018-02-12 21:47 JamesHarrisHKI Note Added: 46404
2018-02-13 10:26 c_schmitz Assigned To c_schmitz => LouisGac
2018-02-13 10:26 c_schmitz Priority none => high
2018-02-21 17:53 JamesHarrisHKI Note Added: 46710
2018-03-01 16:28 olle Status assigned => feedback
2018-03-01 16:28 olle Note Added: 46853
2018-03-01 16:28 olle Assigned To LouisGac => olle
2018-03-05 10:23 LouisGac Assigned To olle => markusfluer
2018-03-05 10:23 LouisGac Note Added: 46890
2018-03-05 10:48 markusfluer Note Added: 46891
2018-03-05 11:05 LouisGac Note Added: 46892
2018-03-05 17:59 JamesHarrisHKI File Added: DateTime-2.png
2018-03-05 17:59 JamesHarrisHKI File Added: DateTime-1.png
2018-03-05 17:59 JamesHarrisHKI Note Added: 46904
2018-03-05 17:59 JamesHarrisHKI Status feedback => assigned
2018-03-05 18:04 LouisGac Note Added: 46905
2018-03-05 18:06 JamesHarrisHKI Note Added: 46906
2018-03-05 18:51 JamesHarrisHKI Note Added: 46911
2018-03-05 18:51 JamesHarrisHKI Note Added: 46912
2018-03-06 11:15 markusfluer Status assigned => closed
2018-03-06 11:15 markusfluer Resolution open => fixed
2018-03-06 11:15 markusfluer Fixed in Version => 3.4.x