Skip Navigation

[Gelöst] How to display date without timepicker in cred form

This support ticket is created vor 5 Jahre, 1 Monat. 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.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

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+01:00)

Dieses Thema enthält 3 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Nigel vor 5 Jahre, 1 Monat.

Assistiert von: Nigel.

Author
Artikel
#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

Sprachen: Englisch (English ) Spanisch (Español )

Zeitzone: Europe/London (GMT+01: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

Sprachen: Englisch (English ) Spanisch (Español )

Zeitzone: Europe/London (GMT+01: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;
}
Dieses Ticket ist jetzt geschlossen. Wenn Sie ein Toolset Kunde sind und Hilfe benötigen, eröffnen Sie bitte ein neues Support-Ticket.