Hi to All,
In dateTime formHelper method, when timeFormat option is set to '24',
Minute interval always is 1.
Read the helper code I wrote a small patch to solve it.
Original cake/libs/view/helpers/form.php
from 1479 line
switch($timeFormat) {
case '24':
$opt .= $this->hour($fieldName, true, $hour,
$selectHourAttr,
$showEmpty) . ':' .
$this->minute($fieldName, $min,
$selectMinuteAttr, $showEmpty);
break;
case '12':
$selectMinuteAttr['interval'] = $interval;
$opt .= $this->hour($fieldName, false, $hour,
$selectHourAttr,
$showEmpty) . ':' .
$this->minute($fieldName, $min,
$selectMinuteAttr, $showEmpty) . '
' .
$this->meridian($fieldName, $meridian,
$selectMeridianAttr,
$showEmpty);
break;
case 'NONE':
default:
$opt .= '';
break;
}
Updated file:
from 1479 line
$selectMinuteAttr['interval'] = $interval;
switch($timeFormat) {
case '24':
$opt .= $this->hour($fieldName, true, $hour,
$selectHourAttr,
$showEmpty) . ':' .
$this->minute($fieldName, $min,
$selectMinuteAttr, $showEmpty);
break;
case '12':
$opt .= $this->hour($fieldName, false, $hour,
$selectHourAttr,
$showEmpty) . ':' .
$this->minute($fieldName, $min,
$selectMinuteAttr, $showEmpty) . '
' .
$this->meridian($fieldName, $meridian,
$selectMeridianAttr,
$showEmpty);
break;
case 'NONE':
default:
$opt .= '';
break;
}
You can download original form helper, updated form helper and diff
file here: http://www.iridiaestudio.com/cakephp/
Two month ago I wrote this trac ticket (https://trac.cakephp.org/
ticket/4641) about this minute interval issue. But seems I hasn't done
right :-p
Hope that helps!
And sorry for my ungly English.
Israel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---