i'm testing dataface, great job !
my first problem is date format : how can i have format dd/mm/YYYY in lists, views and editions with calendar assistant ?
thanks,
french format for dates
8 posts
• Page 1 of 1
You can override the display of any field using delegate classes. E.g. if you have a column named "start_date" that is a datetime field. You can override how it is displayed with a function named start_date__display(). E.g.
It's right but if you define one date field that could be null (like any date of end task), it shows 01-01-1970 instead of an empty field.
Is it possible to create a conditional function? Thanks for the answer and also for the software. It's nice
Hi, How about this: function mydate($format, $time=null){ ÊÊÊÊ if ( $time === 0 ) return '';Ê // return an empty string if time is 0 ÊÊÊÊ return date($format, $time); } Then your delegate class could use this instead of the date function: function start_date__display(&$record){I haven't tested it, but this should work. Best regards Steve
Sorry, it returns this error
Fatal error: Call to undefined function mydate() in K:\PortableApps\xampp\htdocs\soporte\tables\incidencia\incidencia.php on line 10 on line 10 I have function fechasoluc__display(&$record){ return mydate('d-m-Y', strtotime($record->strval('fechasoluc'))); } the function mydate is now defined on ApplicationDelegate.php. I tried also on my incidencias.php and returns the same error Regards Jesus
If you define the function mydate(), make sure that it is outside all of your class definitions. e.g.class conf_ApplicationDelegate { ... ÊÊÊ function mydate(){ ÊÊÊÊÊÊÊ ... ÊÊÊ } } IS WRONG! class conf_ApplicationDelegate { ... } function mydate(){ ... } is CORRECT =Steve
8 posts
• Page 1 of 1
Who is onlineUsers browsing this forum: No registered users and 22 guests |