PHP Classes

Date Display

Recommend this page to a friend!

      DrasticTools  >  All threads  >  Date Display  >  (Un) Subscribe thread alerts  
Subject:Date Display
Summary:Suggestion to allow formatting of a date displayed in a grid
Messages:4
Author:AndyLouSeer
Date:2009-03-22 23:15:00
Update:2011-11-23 13:37:06
 

  1. Date Display   Reply   Report abuse  
Picture of AndyLouSeer AndyLouSeer - 2009-03-22 23:15:00
Can I suggest an additional feature for future versions of the DataGrid Class?

Currently a date is displayed in a grid as YYYY-MM-DD. This is a little foreign to UK users, at least, who normally have dates displayed as DD-MM-YYYY or something similar.

Would it be too difficult to allow users to display dates in their own specified format? Possibly allow a parameter such as:

{name: 'DueDate', type: DDTYPEDATEDD-MM-YYYY, width: 200, editable: true}

It would REALLY be useful if, when a user clicks the pen (edit) icon of a date cell, a calendar popped up to enable them to input a date.

  2. Re: Date Display   Reply   Report abuse  
Picture of dd dd - 2009-03-28 15:34:28 - In reply to message 1 from AndyLouSeer
Andy,

I suppose the way dates are displayed is just the way MySQL is configured to display dates. Because drasticgrid does nothing special for date types, so it is displayed as a string generated from MySQL.
Did you try to alter the date format in MySQL with SELECT DATE_FORMAT
Let me know,...

regards,

DrasticData team

  3. Re: Date Display   Reply   Report abuse  
Picture of Micha Micha - 2011-11-23 13:36:46 - In reply to message 2 from dd
Hi. I have the same problem here now.
I like to format the date this way: dd.mm.yyyy

Is there a small example which show, how to do this?

Thanks

  4. Re: Date Display   Reply   Report abuse  
Picture of Micha Micha - 2011-11-23 13:37:16 - In reply to message 2 from dd
Hi. I have the same problem here now.
I like to format the date this way: dd.mm.yyyy

Is there a small example which show, how to do this?

Thanks