DateTime

QuestionsDateTime
Anthony Southwood asked 11 years ago

Hi,

How does your grid manage entry/edit of mysql Datetime fields, seems popup calendar integrated with grid control only manages dates!

Rgds

13 Answers
Abu Ghufran answered 11 years ago

Hello,

You need set formatter to datetime.
$col["formatter"] = "datetime";

Regards,

Anthony Southwood answered 11 years ago

OK, Abu, that simple! great stuff, thanks
Rgds
Tony

SaschaL answered 11 years ago

Hi,

i'll format a unixtimestamp in query like this:

$g->select_command = "SELECT FROM_UNIXTIME(`time`), `string` FROM `logs`";

How i'll get propper datetime-values in column formatted like this:

$col["formatter"] = "datetime";

In my example i'll get the values "undefined" in each row?

i use the free version of your awesome tool 🙂

Like it!

Kind regards
Sascha

Abu Ghufran answered 11 years ago

The formatter datetime is in new version.
Free version is little outdated, and need a new version update.

You can remove formatter, and it should show date and text form.

Shehzad Ismail answered 10 years ago

Hey Abu,

I transferred my files to another server and the calendar stopped popping up. Can you think of a reason why this would be the case. Is there something in the php.ini file that I need to enable?

-Shehzad

Abu Ghufran answered 10 years ago

Please check if there is some JS error using firebug error console, also make sure all files are correctly transferred.
calendar is just a JS code, it should not interfere with server side things.

Shehzad answered 10 years ago

No javascript related errors. It's working correctly on my GoDaddy server but when I transfer to a Windows server for my client it stops working.

Abu Ghufran answered 10 years ago

Looks to be a file newline char issue. I am unable to reproduce this case here. I use wamp on win7, but all working fine.

In notepad++
open lib/js/themes/jquery-ui-custom.min.js

Try changing EOL
In edit menu -> eol conversion -> windows format

Let me know if not resolved.

Shehzad Ismail answered 10 years ago

I tried making EOL conversion to windows format and am still seeing the same problem =(

Abu Ghufran answered 10 years ago

It's really difficult to guess the issue when it's not being generated.
I've tested code on unix & windows both, but failed to produce this behavior.

This ticket is of different context. I would recommend to open new ticket OR email me your new server details.

Lubos Vitu answered 10 years ago

Hello Abu,
I have the same problem. On the same mysql (mariadb) server run your demo and see the date column, when I run my grid date column is empty.
The date edited in the grid to the database stored properly.
When I defined column to datetime in table and in property $col["formatter"] = "datetime";, in grid I see "undefined", but in database is stored properly.

Regards,

Abu Ghufran answered 10 years ago

Hi,

I am still unable to regenerate this issue.
Please email me the code along with sample db dump, i'll try to regenerate this issue and update will possible fix.

Thanks

Lubos Vitu answered 10 years ago

Hi Abu,
I'm sorry, I was distracted.
I have a column defined in section $col, but I did not define column in SQL query ($grid->select_command =).
Now everything is OK.
This will probably be the answer for SaschaL.

Thanks

Your Answer

19 + 14 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?