How to show the time of datetime with seconds in Alfresco date.ftl?

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
sercama
Active Member II

How to show the time of datetime with seconds in Alfresco date.ftl?

Jump to solution

Hi guys,

I need to show a d:date property with seconds in Alfresco Share.

In the model property es defined as it's described in the following image:

In share-config-custom, I've configured this property as it's described in the following image:

I've used out-of-the-box Alfresco date.ftl template and I've configured it for showing and submitting time.

However, the result in Alfresco Share is without seconds, like this:

I need to show 4/2/2019 15:58:23, for example.

I haven't found how to change date time format of date.ftl component.

Thanks!

1 Solution

Accepted Solutions
sercama
Active Member II

Re: How to show the time of datetime with seconds in Alfresco date.ftl?

Jump to solution

I've found a possible solution for my question, but I don't know if it's the best action to resolve it.

I've overrided form.get.properties, form.get_es.properties, ... in my custom share amp module and I've replaced the following two lines:

form.control.date-picker.entry.time.format=HH:mm:ss
form.control.date-picker.display.time.format=HH:MM:ss (24 Hour)

Note: I've translated the label "Hour" in each overrided file. For example, in file form.get_es.properties, I've typed HH:MM:ss (24 Horas).

I hope this answer can help someone.

Sergio.

1 Reply
sercama
Active Member II

Re: How to show the time of datetime with seconds in Alfresco date.ftl?

Jump to solution

I've found a possible solution for my question, but I don't know if it's the best action to resolve it.

I've overrided form.get.properties, form.get_es.properties, ... in my custom share amp module and I've replaced the following two lines:

form.control.date-picker.entry.time.format=HH:mm:ss
form.control.date-picker.display.time.format=HH:MM:ss (24 Hour)

Note: I've translated the label "Hour" in each overrided file. For example, in file form.get_es.properties, I've typed HH:MM:ss (24 Horas).

I hope this answer can help someone.

Sergio.