Skip Navigation

[Resolved] Date field selector not appearing

This thread is resolved. Here is a description of the problem and solution.

Problem: The datepicker is not appearing on my CRED form when I click the input field.

Solution: Deactivate and delete Types, Views and CRED. Reinstall the plugins from source zip files downloaded from your account page on wp-types.com

This support ticket is created 6 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 8 replies, has 2 voices.

Last updated by deanC-2 6 years, 10 months ago.

Assisted by: Christian Cox.

Author
Posts
#536543

I am trying to: Submit a post form and the date form is not appearing with the calendar picker and we also can't type a date into the date field

I visited this URL: hidden link

I expected to see: A date field with a calendar selector or be able to type in a date

Instead, I got: a field that doesn't allow the date to be input

See this screenshot hidden link

#536649

Hi, I'll take a look. Can you try the following troubleshooting steps?
- Update your Toolset plugins to the latest versions.
- Temporarily disable all non-Toolset plugins and activate a default theme like Twenty Seventeen. Is the problem resolved? If so, please re-enable plugins and your theme one at a time until the conflict is revealed.
- Create another CRED form that includes a date field. Autogenerate the code for the form. Replace the old CRED form with the new CRED form and test the date field. Is this date field also broken?

Please let me know the results.

#536938

- Update your Toolset plugins to the latest versions.

Done. didn't fix it.

- Temporarily disable all non-Toolset plugins and activate a default theme like Twenty Seventeen. Is the problem resolved? If so, please re-enable plugins and your theme one at a time until the conflict is revealed.

De-activated all plugins one-by-one and issue is still occurring. Site has been using this theme for a while without issue. Problem just arose recently so I don't think its the theme.

- Create another CRED form that includes a date field. Autogenerate the code for the form. Replace the old CRED form with the new CRED form and test the date field. Is this date field also broken?

I did this yesterday before writing to you. It didn't work. I also tried creating a new date field and adding it to the form. Didn't work either.

Any other suggestions?

#537205

Site has been using this theme for a while without issue. Problem just arose recently so I don't think its the theme.
Even if the theme has been working in the past, an update to Toolset plugins may have introduced an unforeseen conflict. In order to diagnose the problem, it's essential for me to know if this is a theme conflict, a plugin conflict, or a bug in our code. When you test against a default theme like Twenty Seventeen, this helps narrow down where the conflict or bug is occurring. I hope this makes sense. If you're not able to test on your live site with a default theme, I will need to make a clone of your site where I can test this locally. To do that, I would need login credentials to your wp-admin area and permission to install the Duplicator plugin:
https://wordpress.org/plugins/duplicator

Please let me know how you would like to proceed. I have enabled private reply fields here if you wish to share login credentials securely.

#540293
manual-init.png
2017.png

Sorry I'm not able to reproduce this on a default theme like Twenty Seventeen using the following plugins and versions:
Types 2.2.13
Views 2.4
CRED 1.9
Access 2.4.1
WooCommerce 3.0.8
WooCommerce Views 2.7.3
WordPress 4.8

Please see the attached screenshot 2017.png - this is what a datepicker looks like on a basic CRED form. I'm not saying there is not a bug in our software, I'm just saying that in a bare-bones installation and a simple implementation, I'm not seeing the issue you are describing.

The most productive way for me to troubleshoot this problem will be to make a clone of your site and install it locally. If that's not possible, I may be able to troubleshoot by installing a copy of your site's theme locally. If you export your post types, custom fields, posts and CRED forms, I may be able to install them on my own environment along with your theme to replicate the problem. That would provide me at least some context.

Otherwise I'm a bit stumped. All the JavaScript is minified and obfuscated on your live site, so I can't really pick it apart and find the problems. I don't see any obvious errors in the console, and a validator doesn't show any glaring HTML errors that would indicate a problem in your content markup. If I manually initialize the datepicker by typing this in the console after the page loads:

jQuery('.js-wpt-date').datepicker();

The datepicker becomes initialized and will open and close as expected...but the style is all wrong. See the attached screenshot manual-init.png.

So there's something peculiar happening, but without seeing a clone of your site I'm not really able to help pinpoint it. Private reply enabled again.

#541068
Screen Shot 2017-06-25 at 11.45.07 AM.png

- Update your Toolset plugins to the latest versions.
Done. didn't fix it.
This is strange, because it looks as though your CRED and Views plugins are not fully up-to-date. Perhaps there was a failure during the update process, or an update problem related to using beta versions of these plugins in the past. I'm not quite clear what happened here, but on my local copy I was able to get the datepicker to show up by deleting wp-views and CRED plugins, then reinstalling them using the original plugin zip files. Please try this. Download the plugin files from your account downloads page here on wp-types.com. Deactivate, then delete the CRED and Views plugins from your live site. Reinstall these plugins from the downloaded files. Clear all your caches and cache plugins, then retest. I'm attaching a screenshot from my local installation showing the datepicker as displayed locally.

Next, please look at your JS editor panel here:
wp-admin/post.php?post=1143&action=edit
This datepicker initialization script is not necessary for CRED and can be removed safely:

jQuery('.js-wpt-date').datepicker();

Please let me know if the updated plugins do not resolve this issue satisfactorily and I will take another look.

#541250

We tried doing it in our localhost and updated the CRED, Types and Views toolset plugins and applied your recommendation. It still did not work. Can you take a second look?

#541422

I just ran through this again starting from scratch and had the same results. These are the steps I took on my own local environment to resolve the problem with your site's clone:
1. Run installer.php to set up site, creating a new admin user for myself
2. Delete the following plugin folders from the localhost server's wp-content/plugins/ directory: types/, wp-views/, cred-frontend-editor/
3. Log in as new admin user using custom login screen at /wp-admin/
4. Install Types 2.2.13 by going to Plugins > Add New > Upload Plugin, then activate it.
5. Install Views 2.4 by going to Plugins > Add New > Upload Plugin, then activate it
6. Install CRED 1.9.0.1 by going to Plugins > Add New > Upload Plugin, then activate it
7. Navigate to /activity-submission-test/
8. Problem is resolved
9. (optional) Delete the datepicker intialization JS from your CRED editor JS panel.

Can you please take another look?

#541832

We tried the fix on the live site and it worked. It wasn't working in the localhost, but we tried it three times on the live site before it finally worked.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.