Skip to content

Commit

Permalink
fix select hours for 0/12
Browse files Browse the repository at this point in the history
  • Loading branch information
euromark committed Apr 30, 2013
1 parent fab5a6f commit 6b015d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/View/Helper/FormHelper.php
Expand Up @@ -2207,7 +2207,7 @@ public function hour($fieldName, $format24Hours = false, $attributes = array())
if ($attributes['value'] > 12 && !$format24Hours) {
$attributes['value'] -= 12;
}
if ($attributes['value'] === '00' && !$format24Hours) {
if (($attributes['value'] === 0 || $attributes['value'] === '00') && !$format24Hours) {
$attributes['value'] = 12;
}

Expand Down

0 comments on commit 6b015d9

Please sign in to comment.