Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timepicker not showing on Date fields #173

Closed
paulrwest opened this issue Jan 12, 2017 · 9 comments
Closed

Timepicker not showing on Date fields #173

paulrwest opened this issue Jan 12, 2017 · 9 comments

Comments

@paulrwest
Copy link

Timepicker is not showing in popup box when clicking on Date Field "Add a Time picker" is configured to be on. I have deleted the field and added a new Date field to double check.

From debugging I can see all the settings are correct and getting passed to JS so I think the issue could be in the timepicker plugin.

@botchris
Copy link
Collaborator

I'll take a look ;)

@quickapps
Copy link
Owner

I was completely unable to reproduce this issue 😩 , I've tried different configurations and seems to work just fine.

Could you provide information about how your date field is configured?
Can be this related to the browser you are using?

This Date Field was refactored time ago in order to add new features, could this be related to?

Here are the settings I'm using when trying to reproduce the issue (all this using a new fresh installation):

screen shot 2017-01-12 at 21 22 41

screen shot 2017-01-12 at 21 23 03

@paulrwest
Copy link
Author

paulrwest commented Jan 13, 2017

So I have deleted everything in vendor and done a composer update to make sure I'm running latest.

I have copied your settings and still no time, not sure what could be causing it debug shows no errors

image

image

The JS built for the input:

$(document).ready(function() {
        $('#dp-container-event-start-date .picker').datetimepicker({
            showAnim: 'drop',
timeOnlyTitle: 'Choose Time',
timeText: 'Time',
hourText: 'Hour',
minuteText: 'Minute',
secondText: 'Second',
millisecText: 'Milliseconds',
showSecond: true,
ampm: true,
dateFormat: "yy-mm-dd",
timeFormat: 'H:mm:ss',
showButtonPanel: true,
changeMonth: true,
changeYear: true,
showWeek: true,
firstDay: 1,
numberOfMonths: 3        });

        
        var dateFormat = $('#dp-container-event-start-date .picker').datetimepicker('option', 'dateFormat');
        $('#dp-container-event-start-date .format').val(dateFormat);

                    var timeFormat = $('#dp-container-event-start-date .picker').datetimepicker('option', 'timeFormat');
            var currentVal = $('#dp-container-event-start-date .format').val();
            $('#dp-container-event-start-date .format').val(currentVal + ' ' + timeFormat);
            });

@paulrwest
Copy link
Author

Ok after some debugging and testing it is adding an attachment field that breaks the timepicker section of the Date field there are no errors I will try and work out whats blocking what

@botchris
Copy link
Collaborator

So using both Attachment Field & Date Field at the same time causes the problem?

@paulrwest
Copy link
Author

Yes, I had a quick look at why but couldn't see the exact reason, the HTML/JavaScript built for the date field is identical, the order the fields are in seem to have no effect. from a quick step debug it looks as though the timepicker skips the building process.

@botchris
Copy link
Collaborator

botchris commented Feb 15, 2017

I was totally unable to reproduce the issue; I've tried adding both Date and Attachment fields to my "Article" content type and everything seems to works just fine, I was able to upload a file as attachment and select a date and time from the picker.

  • Can it be caused by some sort of field configuration?
  • How many instances of the same field type are you using, e.g. "start date" and "end date" are both instance of Date type?

screen shot 2017-02-15 at 21 57 00

@paulrwest
Copy link
Author

Hi Chris,

I'm not sure whats causing it but it's not a quickapps issue so feel free to close and sorry for wasting your time.

I have it working on the test server (running in a Docker container) but still not working locally (Also running in Docker but which is really odd so I think its a system config issue or a windows/linux issue.

Paul

@botchris
Copy link
Collaborator

Dont worry 😄

Can it be related to JS script files not being properly loaded by the browser?
I've seen similar issues when running virtual machines caused by some kind of dark magic coming from Apache. Check apache's mod_gzip, mod_rewrite, etc. and make sure resources are being properly loaded by the browser.

Closing this ticket, but feel free to comment whenever you want.

Regards!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants