Browse Source

Merge pull request #1257 from dereuromark/master-form-helper-hour-fix

fix select hours for 0/12
Mark Story 13 years ago
parent
commit
9b7cd0286f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/Cake/View/Helper/FormHelper.php

+ 1 - 1
lib/Cake/View/Helper/FormHelper.php

@@ -2207,7 +2207,7 @@ class FormHelper extends AppHelper {
 		if ($attributes['value'] > 12 && !$format24Hours) {
 			$attributes['value'] -= 12;
 		}
-		if ($attributes['value'] === '00' && !$format24Hours) {
+		if (($attributes['value'] === 0 || $attributes['value'] === '00') && !$format24Hours) {
 			$attributes['value'] = 12;
 		}