Hide the Time Field for Date TVs

A quick tip showing how to hide the Time field when editing MODX date TVs in the Manager

Here's a quick tip from MODX Forum user squarou about hiding the time field when editing date TVs in the MODX Manager.

MODX logo

Hiding the Time Field for date TVs

I confess that I didn't know about this until I read squarou's post in the forums. When I saw a request to hide the Time field, I assumed it would have to be done with a plugin that loaded some JavaScript or inserted some custom CSS into the Manager page.

Luckily, there's a much easier way. Here are the steps:

  1. Create or Edit a date-type TV
  2. Click on the "Input Options" tab
  3. Make sure the Input Type is set to "Date"
  4. Scroll all the way to the bottom
  5. Set the "Hide time option for user" to Yes
  6. Don't forget to save the TV

MODX will detect the option setting and hide the time field automatically. The time will be set to 00:00 so any events tied to the TV will occur just after midnight on the date specified.

Coming Up

In the next article, we'll look at how to select users from a drop-down list in a TV and show their user information on the page.

Looking for high-quality, MODX-friendly hosting? As of May 2016, Bob's Guides is hosted at A2 hosting. (More information in the box below.)

Comments (0)

Please login to comment.