Skip Navigation

[Resolved] How to display date without timepicker in cred form

This support ticket is created 5 years, 5 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 3 replies, has 2 voices.

Last updated by Nigel 5 years, 5 months ago.

Assisted by: Nigel.

Author
Posts
#1262367
Clipboard01555.jpg

Tell us what you are trying to do? Display only date without timepicker

Is there any documentation that you are following? Cannot find instructions

Is there a similar example that we can see? none

What is the link to your site? n/a

#1262381

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screenshot 2019-06-07 at 13.21.01.png

Hi there

If the timepicker is being shown it's because when setting up the date field you chose the option to input date and time (screenshot).

If you don't need the time and just need the date then changes you make there will be reflected in what's output in the form.

If you need date & time for this field in the backend but only date in the frontend then you could use CSS to hide the time fields.

#1262429

Please let me know how to hide hours and minutes cred field by CSS? As css selectors are generated randomly each time form loads. Thank you.

#1262455

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

When editing the form, if you switch to expert mode you can edit the markup.

You should see that your date/time field is added using a cred-field shortcode, which is placed inside a div with a class of form-group.

You can add another class there, e.g. "hide-select".

You could then hide the time select inputs and there labels with

.hide-select select, .hide-select span.wpt-form-label {
    display: none;
}