How to hide the seconds in a time field?

If you have a time field in your AppGini application, it displays a time picker in the detail view like this one:

The timepicker includes seconds. If you wish to hide the seconds part, you could do so by editing the tablename_dv hook. Open the generated hooks/tablename_dv.php file in a text editor (where tablename is the name of the concerned table) and look for the dv function, then add this line inside it:

If you refresh the page, the time field would now look like this, showing no seconds:

Published by Genedy

I'm the founder of BigProf Software. We're a tiny team of developers who create tools that make it easy (and affordable) for anyone to create connected business applications that work from any device with a browser.

One reply on “How to hide the seconds in a time field?”

  1. The method described above works only for time fields. For datetime fields, try adding the following code to the file hooks/tablename-dv.js (where tablename is the name of the concerned table — create that file if it’s not already there):

    Replace datetimefield in the above code with the actual datetime field name.

Comments are closed.