Development

Changeset 3012

You must first sign up to be able to contribute.

Changeset 3012

Show
Ignore:
Timestamp:
12/11/06 11:33:16 (2 years ago)
Author:
chtito
Message:

right input format for timestamps (also partially solves #1125)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/helper/FormHelper.php

    r2974 r3012  
    744744    return select_date_tag($name, $value, $options, isset($options['html']) ? $options['html'] : array()); 
    745745  } 
     746   
     747  if (_get_option($options, 'withtime', false)) 
     748  { 
     749    $pattern = 'g'; 
     750  } 
     751  else 
     752  { 
     753    $pattern = 'd'; 
     754  } 
    746755 
    747756  // parse date 
     
    753762  { 
    754763    $dateFormat = new sfDateFormat($culture); 
    755     $value = $dateFormat->format($value, _get_option($options, 'format', 'd')); 
     764    $value = $dateFormat->format($value, _get_option($options, 'format', $pattern)); 
    756765  } 
    757766