Listit2 won't display time

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
burlington
Power Poster
Power Poster
Posts: 444
Joined: Wed Dec 27, 2006 5:15 pm

Listit2 won't display time

Post by burlington »

The title really says it all. Listit2 displays the date fine enough BUT when there is a time field, it shows a date instead.
Running CMSMS 1.11.9 and Listit2 version 1.4.1
Any ideas folks?
Thanks
Martin
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Listit2 won't display time

Post by velden »

The default summary template (and I guess the same for detail template) has this code:

Code: Select all

{elseif $fielddef.type == 'SelectDateTime'}
					{$fielddef.name}: {$fielddef.value|cms_date_format}<br />
The cms_date_format modifier probably has a default format for a date and not time, hence printing current date.

So, either remove it, of use a custom format for your demands, e.g:

Code: Select all

{$fielddef.value|cms_date_format:"%H:%M"}
burlington
Power Poster
Power Poster
Posts: 444
Joined: Wed Dec 27, 2006 5:15 pm

Re: Listit2 won't display time

Post by burlington »

Thanks Velden. Worked fine.

By the way, do you know what file controls the input template. I am getting huge boxes for each field I want to use. The maximum size allowed does not seem to affect the size of the entry boxes.

Martin
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Listit2 won't display time

Post by velden »

This might help: http://docs.cmsmadesimple.org/customizi ... -templates

Though not sure if it's usable with ListIt2
Post Reply

Return to “Modules/Add-Ons”