| Index
» Projects
» phpMyEdit
» Forum
» Cannot get time editing |
 |
msta
Joined: 15 Sep 2008
Posts: 24
Posted: 2008-10-06 20:00
Back to top
Reply with quote
|
I have placed a collumn, on which a time shall be displayed. The time shall be in format (hh:mm).
In MySQL the "time" collumn type was selected. This gives standard format (hh:mm:ss).
Regardles of what kind of cell formating I use I always get in editing windows a format ready to change (00:00:00).
I use the following format to enter a time:
$opts['fdd']['Time'] = array(
'name' => 'Time',
'select' => 'T', //also tried 'N'
'maxlen' => 8,
'datemask' => date('H:i'), //also tried 'H:i:s'
);
$opts['fdd']['DepartureTime']['js']['regexp'] =
'^([0-1][0-9]|[2][0-3])(:([0-5][0-9])){1,2}$'; // checking that format (hh:mm) was entered
$opts['fdd']['DepartureTime']['js']['hint']
= 'Enter time in format hh:mm';
It is simple code but is not working.
When I enter any time in edit mode, then the time is memorized by MySQL byut is not dispalyed at all in read mode.
Besides the java script (two last lines) does not work at all.
Someone can help to solve this easy looking problem?
Marek
|
ajh
Joined: 17 Dec 2003
Posts: 236
Posted: 2008-10-07 11:52
Back to top
Reply with quote
|
Try treating it as a calendar field. I think that you already are using the mce_cal extension. jsCalendar can act as time entry as well as date entry.
|
|
Post new topic
Reply to topic
|
|
|
|